Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxStatusBarKeyStateAppearance.GetRectWidth(TcxCanvas,TdxScaleFactor) Method

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

#Declaration

Delphi
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