[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Gets the size of the Caption text within the specified PaintRect.
Source position: buttons.pp line 402
protected function TCustomSpeedButton.GetTextSize( |
Drawing: Boolean; |
PaintRect: TRect |
):TSize; virtual; |
Drawing |
|
Not used in the current implementation. |
PaintRect |
|
Display rectangle for the control; updated in the method with the calculated text dimensions. |
TSize instance with the dimensions for the caption text.
GetTextSize is a TSize function used to get the dimensions for the Caption text for the control. It calculates the dimensions for the text using the TextStyle and Font assigned to the control Canvas.
The return value is a TSize instance where the CX and CY members represent the width and height for the text. The DrawText routine in the LCL interface is called to calculate the dimensions using the text style, flags, and the PaintRect for the control. The coordinates from the updated PaintRect are stored in CX and CY in the return value. Both members are set to 0 when ShowCaption is False or Caption contains an empty string ('').
GetTextSize is called from the MeasureDraw method.
|
Indicates if the Caption for the speed button is displayed. |
|
|
Calculates the Width, Height, and layout for the speed button and optionally renders the control. |
|
|
A clipped window into the parent Canvas. |
|
|
The text displayed for the control. |
|
|
The font to be used for text display in this control. |
Version 3.2 | Generated 2024-02-25 | Home |