hiGetTextWidth
hiGetTextWidth(S_fontType t_text) =>x_width /-1
Description
Returns the width, in pixels, of a string of characters that has a specified font.
This value is useful when creating two-dimensional forms.
Arguments
|
Type of the font you want to use.
|
|
Values Returned
Unlike the hiGetTextWidth function, if an invalid font is specified in the hiTextWidth function, then the return value is nil.
Examples
hiGetTextWidth( 'text "This is a string." )
=> 119
hiGetTextWidth( "label" "This is a string." )
=> 84
hiGetTextWidth( "notafont" "This is a string." )
=> *WARNING* hiiGetTextWidth: Invalid font type "notafont", must be "text" or "label".
-1
Related Topics
Return to top