[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Gets the size for the glyph (color block / swatch) on the button control.
Source position: dialogs.pp line 351
protected function TColorButton.GetGlyphSize( |
Drawing: Boolean; |
PaintRect: TRect |
):TSize; override; |
Drawing |
|
True if a drawing operation is active; never set to False in LCL code. |
PaintRect |
|
TRect instance with the display area for the button control. |
TSize instance with the dimensions for the glyph (color block).
GetGlyphSize is an overridden TSize function used to get the dimensions for the glyph (color block / swatch) displayed on the button control. Values in ButtonColorAutoSize and ButtonColorSize determine the height and width used for the color block displayed on the control.
When ButtonColorAutoSize is set to True, the color block is auto-sized to fill the unused client area for the control specified in the PaintRect argument. Space is reserved for the Caption (color name), Spacing, BorderWidth, and Margin properties assigned to the control.
When ButtonColorAutoSize is False, ButtonColorSize is used as both the width and height for the color block.
The return value is a TSize instance where the width and height for the color block are stored in the CX and CY members (respectively). Layout determines whether spacing is reserved in the horizontal (blGlyphLeft, blGlyphRight) or vertical (blGlyphTop, blGlyphBottom) dimensions.
|
True if the color block for the button can be automatically resized to fill the unused client area. |
|
|
Size of the color block (or swatch) on the button control. |
|
|
Width for the borders on the button control. |
|
|
The text displayed for the control. |
Version 4.0 | Generated 2025-05-03 | Home |