[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Dialogs' (#lcl)

TColorButton.Caption

Text displayed next to the color block on the button control.

Declaration

Source position: dialogs.pp line 336

published property TColorButton.Caption : TCaption;

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

TColorButton.ButtonColorAutoSize

  

True if the color block for the button can be automatically resized to fill the unused client area.

TColorButton.ButtonColorSize

  

Size of the color block (or swatch) on the button control.

TColorButton.OnColorChanged

  

Event handler signalled when the button color has been changed.

TCustomSpeedButton.Spacing

TCustomSpeedButton.Layout


Version 3.2 Generated 2024-02-25 Home