# Command: StringWidth

StringWidth (string) Definition:

Returns the width (in pixels) of a given string.

Parameter Description:

string = any valid string or string variable

Command Description:

This will return the size, in pixels, the width of the indicated string. This is useful for determining screen layout, scrolling of text, and more. This is calculated based on the size of the currently loaded font.

Example:

; StringWidth/Height Example a$="Hello Shane!" Print "A$=" + a$ Print "This string is "+ StringWidth(a$) + " pixels wide and" Print "it is " + StringHeight(a$) + " tall, based on the current font!"

Index