[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Gets the size of the text within the specified PaintRect.
Source position: buttons.pp line 399
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.
GetTextSize removes Ampersand (&) characters in Caption prior to calculating the dimensions for the text using the TextStyle for the control Canvas. The value in PaintRect is updated with the calculated dimensions. The X and Y members in the return value contain the Width and the height for the text using the Font for the control. Both member values are set to 0 when ShowCaption is False or Caption contains an empty string ('').
GetTextSize is called from the MeasureDraw method.
|
Calculates the Width, Height, and layout for the speed button and optionally renders the control. |
|
|
Indicates if the Caption for the speed button is displayed. |
|
|
A clipped window into the parent Canvas. |
|
|
The text displayed for the control. |
|
|
The font to be used for text display in this control. |