ControlLabel
ControlLabel - signature for the "control" data editing
The TDBEditEh, TDBNumberEditEh, TDBComboBoxEh, TDBMemoEh, TDBLookupComboboxEh, TDBImageEh, TDBRichEditEh components are added ControlLabel property – the text next to the editing control. ControlLabel a class of type TLabel, which retain their position on the master control when moving the control to which it is attached. The combination of TDBEditEh + ControlLabel built on the principle of a standard control - TLabeledEdit.
Default ControlLabel is not visible. To make ControlLabel visible set EditControl.ControlLabel.Visible property to True.
If EditControl is tied to the database field, it displays the title ControlLabel field of Field.DisplayName property.
To adjust the location of ControlLabel use subproperties of ControlLabelLocation property:
property Position: TLabelPositionEh
TLabelPositionEh = (lpAboveLeftEh, lpAboveCenterEh, lpAboveRightEh, lpBelowLeftEh, lpBelowCenterEh, lpBelowRightEh, lpLeftTopEh, lpLeftTextBaselineEh, lpLeftCenterEh, lpLeftBottomEh, lpRightTopEh, lpRightTextBaselineEh, lpRightCenterEh, lpRightBottomEh);
property Spacing: Integer
property Offset: Integer
property LabelSpacingBound: TSpacingBoundEh
TSpacingBoundEh = (sbNearBoundEh, sbFarBoundEh);
sbNearBoundEh – Spacing the distance is relative to the brink of near-Label control.
sbFarBoundEh – Spacing The distance is relative to the far verge Label control.
Below are the typical set of values of ControlLabelLocation subproperties:
ControlLabelLocation.LabelSpacingBound = sbNearBoundEh
ControlLabelLocation.Spacing = 3
ControlLabelLocation.Position = lpAboveLeftEhControlLabelLocation.LabelSpacingBound = sbNearBoundEh
ControlLabelLocation.Spacing = 3
ControlLabelLocation.Position = lpLeftTextBaselineEhControlLabelLocation.LabelSpacingBound = sbFarBoundEh
ControlLabelLocation.Spacing = 80
ControlLabelLocation.Position = lpLeftTextBaselineEh