Skip to main content

TcxCustomEditButton.ContentAlignment Property

Specifies caption text alignment.

Declaration

property ContentAlignment: TAlignment read; write; default taCenter;

Property Value

Type Default Description
TAlignment taCenter

The caption text alignment.

Remarks

Use the ContentAlignment property to position a caption within the editor button when its width exceeds the caption width.

Note

Left and right-aligned caption positions swap places when the parent editor’s BiDiMode property is set to bdRightToLeft.

Property Value Examples

Value Example[1]
taCenter (default) VCL Editors Library: Centered Caption Text
taLeftJustify[2] VCL Editors Library: Left-Aligned Caption Text
taRightJustify[3] VCL Editors Library: Right-Aligned Caption Text

Limitations

The ContentAlignment property value is ignored when one of the following conditions is met:

Default Value

The ContentAlignment property’s default value is taCenter.

Footnotes
  1. These examples demonstrate all possible ContentAlignment property values for the same button editor with one embedded button under the following conditions:

    • The Office2013White skin is in effect.
    • The Caption property is set to 'Search'.
    • The Kind property is set to bkText.
    • The Width property is set to 70.
    • The parent editor’s BiDiMode property is set to bdLeftToRight.
  2. Caption text is aligned to the right button border if the parent editor’s BiDiMode property is set to bdRightToLeft.

  3. Caption text is aligned to the left button border if the parent editor’s BiDiMode property is set to bdRightToLeft.

See Also