Class TLabelPanel (unit LabelPanel) |
Inherits from
TPanel
LabelPanel puts text labels next to the controls inside of it.
constructor Create(owner : TComponent);
- Public declarations
destructor Destroy;
procedure AlignControls(AControl: TControl; var Rect: TRect);
We're overriding this because it gets called when controls are moved around.
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);
property DesignOutlines : Boolean
Draws dotted outlines around the controls that will have labels
painted for them.
property LabelAlign : TAlignment
The horizontal alignment of the label within the sector dictated by
the xxxPos properties.
property LabelClasses : TStrings
A TStrings that has the list of classes that will have their
label drawn.
property LabelDisplays : TLabelDisplays
A set of options describing what to display in the labels.
property LabelFont : TFont
The font for the labels.
property LabelHorzPos : TLabelHorzPos
The sector, horizontally, the label will appear in.
property LabelSize : Integer
The size of the label, if fixed.
property LabelVertAlign : TVertAlignment
The vertical alignment of the label within the sector dictated by
the xxxPos properties.
property LabelVertGap : Integer
The distance between the control and the label, vertically.
property LabelVertPos : TLabelVertPos
The sector, vertically, the label will appear in.
event LabelHorzGap : Integer
The distance between the control and the label, horizontally.
event OnLabelSet : TLabelSetEvent
This event gives the application the opportunity to modify labels
as they are assigned to controls.
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;
constructor Create(owner : TComponent);
Public declarations
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);
property DesignOutlines : Boolean
Draws 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 : TAlignment
The horizontal alignment of the label within the sector dictated by
the xxxPos properties.
property LabelClasses : TStrings
A 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 : TLabelDisplays
A 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 : TFont
The font for the labels. There is only one font for all
the labels.
property LabelHorzPos : TLabelHorzPos
The sector, horizontally, the label will appear in.
property LabelSize : Integer
The size of the label, if fixed.
property LabelVertAlign : TVertAlignment
The vertical alignment of the label within the sector dictated by
the xxxPos properties.
property LabelVertGap : Integer
The distance between the control and the label, vertically.
property LabelVertPos : TLabelVertPos
The sector, vertically, the label will appear in. See the diagram
at the top of the file for details on sectors.
event LabelHorzGap : Integer
The distance between the control and the label, horizontally.
event OnLabelSet : TLabelSetEvent
This event gives the application the opportunity to modify labels
as they are assigned to controls.
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;