You are here: Symbol Reference > JSDialog Namespace > Classes > TJSCustomDialog Class > TJSCustomDialog Methods > TJSCustomDialog.RequiredWidth Method
LMD DialogPack
ContentsIndexHome
PreviousUpNext
TJSCustomDialog.RequiredWidth Method

Returns the number of pixels the string passed in needs to be displayed with the specific default dialog font.

Pascal
class function RequiredWidth(const ALine: string; AFontType: TJSFontType): Integer;

Use this method to help determine the width you want the dialog needs to display to force a particular line of text to be display on one line. Pass in the specific font you want to use to accurately calculated the size.

To calculate the width for the content, use the ContentLineWidth method unless you need to know the width without creating an instance of a dialog. For a custom font you will need to calculate the size yourself using the specific font characteristics.

Copyright © 2013 by LMD Innovative. All rights reserved.
Copyright © 2013 by LMD Innovative. All rights reserved.
What do you think about this topic? Send feedback!