Skip to main content

TdxStatusBarKeyStateAppearance.GetRectWidth(TcxCanvas,TdxScaleFactor) Method

Returns the bounding rectangle of the panel section corresponding to a specific key.

Declaration

function GetRectWidth(ACanvas: TcxCanvas; AScaleFactor: TdxScaleFactor): Integer; overload;

Parameters

Name Type
ACanvas TcxCanvas
AScaleFactor TdxScaleFactor

Returns

Type
Integer

Remarks

The TdxStatusBarKeyStateAppearance object holds appearance options for a keyboard status panel’s section. The GetRectWidth method is used to obtain the width of this section. Its ACanvas parameter specifies the canvas where the section will be painted. Note that section width depends on the width of text displayed within it. Thus, the return value depends on the font settings specified by the canvas.

The GetRectWidth method can be used, for instance, when painting panels manually. Please refer to the OnDrawPanel event of the panel object for details.

See Also