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

TCustomSpeedButton.GetGlyphSize

Gets the size of the glyph within the specified PaintRect.

Declaration

Source position: buttons.pp line 401

protected function TCustomSpeedButton.GetGlyphSize(

  Drawing: Boolean;

  PaintRect: TRect

):TSize; virtual;

Arguments

Drawing

  

True if the control is drawing, False if the control is measuring its components.

PaintRect

  

Client rectangle for the control.

Function result

TSize instance with the Width (CX) and height ( CY) for the glyph .

Description

GetGlyphSize is a TSize function used to get the size of the glyph within the client rectangle specified in the PaintRect argument. The return value contains the Width (in CX) and the height (in CY). The member values are retrieved from a scaled image resolution for the glyph bitmaps in ButtonGlyph. The values are scaled to the client rectangle using the PixelsPerInch for the Font and the Canvas scaling factor for the control.

Use GetTextSize to get the Width and height or the Caption displayed on the control.

GetGlyphSize is used in the implementation of the MeasureDraw method.

See also

TCustomSpeedButton.ButtonGlyph

  

Gets the TButtonGlyph used for the control.

TCustomSpeedButton.GetTextSize

  

Gets the size of the Caption text within the specified PaintRect.

TCustomSpeedButton.MeasureDraw

  

Calculates the Width, Height, and layout for the speed button and optionally renders the control.


Version 3.2 Generated 2024-02-25 Home