TColorButton.Caption property
Text displayed next to the color block on the button control.
Declaration
property Caption:;Description
Caption is a String property with the text displayed beside the color block (or swatch) on the button control. When it has been assigned a non-empty value, space is reserved on the client area for the text plus the number of pixels in Spacing. When empty, no space is reserved for the text or the space between the text and the color block.
In general, Caption can be used to provide a human-readable value for the selected color in ButtonColor. The value in Caption is not, however, automatically linked to the selected color value. Use the OnColorChanged event handler to update the value in Caption as needed when the color selection has been changed.
The Layout property determines the order of the Caption and color block values on the button surface. Layout refers to the alignment for the glyph (color block).
Set ButtonColorAutoSize to True to allow the color block to fill the unused client area for the control. Use ButtonColorSize to set the dimensions for the color block when ButtonColorAutoSize is False.
See also
- ButtonColorAutoSize
- ButtonColorSize
- OnColorChanged
- Spacing
- Layout
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
