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) |
![]() |
taLeftJustify[2] |
![]() |
taRightJustify[3] |
![]() |
Limitations
The ContentAlignment property value is ignored when one of the following conditions is met:
- The Kind property is set to bkDown, bkGlyph, or bkEllipsis.
- The Caption property is unspecified.
- The Width property is set to
0.
Default Value
The ContentAlignment property’s default value is taCenter.
-
These examples demonstrate all possible
ContentAlignmentproperty values for the same button editor with one embedded button under the following conditions:- The
Office2013Whiteskin 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.
- The
-
Caption text is aligned to the right button border if the parent editor’s BiDiMode property is set to
bdRightToLeft. -
Caption text is aligned to the left button border if the parent editor’s BiDiMode property is set to
bdRightToLeft.


