Unit 'ExtCtrls' Package
[Overview][Types][Classes][Procedures and functions][Index] [#lcl]

TCustomLabeledEdit.DoPositionLabel

DoPositionLabel - perform the code for positioning the label.

Declaration

Source position: extctrls.pp line 1022

protected procedure TCustomLabeledEdit.DoPositionLabel; virtual;

Description

DoPositionLabel is a procedure used to place the EditLabel relative to the companion control. No actions are performed in the method when EditLabel is unassigned (contains Nil).

DoPositionLabel ensures that DisableAlign is called in the Parent control (when assigned). EnableAlign is called for the Parent control prior to exiting from the method.

DoPositionLabel updates EditLabel to use the values assigned to the Parent and Visibility properties. The values in LabelPosition and LabelSpacing are used to set the anchor position for the EditLabel and the spacing between EditLabel and the edit box on the control.

Version info

Modified in LCL version 4.0 to use the Layout property in the TBoundLabel instance to determine vertical alignment for the label caption.

See also

TCustomLabeledEdit.EditLabel

  

EditLabel - the label attached to the edit box.

TCustomLabeledEdit.LabelPosition

  

Edge on the edge control where the bound label is aligned.

TCustomLabeledEdit.LabelSpacing

  

Number of pixels between the control and its bound label.

TBoundLabel.Layout

  

Specifies the vertical alignment for the Caption text on the label.

TControl.Visible

  

Allows the control, and all of its children, to be displayed or hidden.

TWinControl.DisableAlign

  

Disables auto-sizing when aligning the control and its parent.

TWinControl.EnableAlign

  

Re-enables auto-sizing after aligning the control and its parent.

TControl.Parent

  

The control within which the control is shown.