| Class TLabelPanel (unit LabelPanel) |
TPanel
LabelPanel puts text labels next to the controls inside of it.
| Constructors |
constructor Create(owner : TComponent);| Functions |
destructor Destroy;
procedure AlignControls(AControl: TControl; var Rect: TRect);
procedure Paint;
procedure SetDesignOutlines(b : Boolean);
procedure SetLabelAlign(a : TAlignment);
procedure SetLabelclasses(s : TStrings);
procedure SetLabelDisplays(d : TLabelDisplays);
procedure SetLabelFont(f : TFont);
procedure SetLabelHorzGap(i : Integer);
procedure SetLabelHorzPos(a : TLabelHorzPos);
procedure SetLabelSize(i : Integer);
procedure SetLabelVertAlign(a : TVertAlignment);
procedure SetLabelVertGap(i : Integer);
procedure SetLabelVertPos(a : TLabelVertPos);| Properties |
property DesignOutlines : Boolean
property LabelAlign : TAlignment
property LabelClasses : TStrings
property LabelDisplays : TLabelDisplays
property LabelFont : TFont
property LabelHorzPos : TLabelHorzPos
property LabelSize : Integer
property LabelVertAlign : TVertAlignment
property LabelVertGap : Integer
property LabelVertPos : TLabelVertPos| Events |
event LabelHorzGap : Integer
event OnLabelSet : TLabelSetEvent| Variables |
FDesignOutlines : Boolean;
FLabelAlign : TAlignment;
FLabelClasses : TStrings;
FLabelDisplays : TLabelDisplays;
FLabelFont : TFont;
FLabelHorzGap : Integer;
FLabelHorzPos : TLabelHorzPos;
FLabelSize : Integer;
FLabelVertAlign : TVertAlignment;
FLabelVertGap : Integer;
FLabelVertPos : TLabelVertPos;
FOnLabelSet : TLabelSetEvent;| Constructors |
constructor Create(owner : TComponent);Public declarations
| Functions |
destructor Destroy;
procedure AlignControls(AControl: TControl; var Rect: TRect);We're overriding this because it gets called when controls are moved around. We can take advantage of that to invalidate ourselves. //
procedure Paint;
procedure SetDesignOutlines(b : Boolean);
procedure SetLabelAlign(a : TAlignment);
procedure SetLabelclasses(s : TStrings);
procedure SetLabelDisplays(d : TLabelDisplays);
procedure SetLabelFont(f : TFont);
procedure SetLabelHorzGap(i : Integer);
procedure SetLabelHorzPos(a : TLabelHorzPos);
procedure SetLabelSize(i : Integer);
procedure SetLabelVertAlign(a : TVertAlignment);
procedure SetLabelVertGap(i : Integer);
procedure SetLabelVertPos(a : TLabelVertPos);| Properties |
property DesignOutlines : BooleanDraws dotted outlines around the controls that will have labels painted for them. This is handy for determining which controls will have the labels, and also for seeing the extent of certain transparent controls, like DBText.
property LabelAlign : TAlignmentThe horizontal alignment of the label within the sector dictated by the xxxPos properties.
property LabelClasses : TStringsA TStrings that has the list of classes that will have their label drawn. You may want to add or subtract class names from this list. If labels are not appearing, the most probable cause is that the class is not listed in the LabelClasses property.
property LabelDisplays : TLabelDisplaysA set of options describing what to display in the labels.
ldHint : Displays what is in the hint property.
ldFieldLabel : Displays the label for the field the db control is attached to.
ldAddColon: Adds a colon after the text in the hint or from the field name.
property LabelFont : TFontThe font for the labels. There is only one font for all the labels.
property LabelHorzPos : TLabelHorzPosThe sector, horizontally, the label will appear in.
property LabelSize : IntegerThe size of the label, if fixed.
property LabelVertAlign : TVertAlignmentThe vertical alignment of the label within the sector dictated by the xxxPos properties.
property LabelVertGap : IntegerThe distance between the control and the label, vertically.
property LabelVertPos : TLabelVertPosThe sector, vertically, the label will appear in. See the diagram at the top of the file for details on sectors.
| Events |
event LabelHorzGap : IntegerThe distance between the control and the label, horizontally.
event OnLabelSet : TLabelSetEventThis event gives the application the opportunity to modify labels as they are assigned to controls.
| Variables |
FDesignOutlines : Boolean;
FLabelAlign : TAlignment;
FLabelClasses : TStrings;
FLabelDisplays : TLabelDisplays;
FLabelFont : TFont;Protected declarations
FLabelHorzGap : Integer;
FLabelHorzPos : TLabelHorzPos;
FLabelSize : Integer;
FLabelVertAlign : TVertAlignment;
FLabelVertGap : Integer;
FLabelVertPos : TLabelVertPos;
FOnLabelSet : TLabelSetEvent;