Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
lcLine = .lblLabel1.Caption
lnWidth = (TXTWIDTH(&lcLine,[MS Sans Serif],8) * ;
FONTMETRIC(6,[MS Sans Serif],8))
FUNCTION GetTextSize
* Determines the width in pixels of a given text string, based on
* a given font, font style and point size.
* Parameters: text string, font name, size in points, font style in
* format used by FONTMETRIC() (e.g. "B" for bold, "BI" for bold italic;
* defaults to normal).
LPARAMETERS tcString, tcFont, tnSize, tcStyle
LOCAL lnTextWidth, lnAvCharWidth
IF EMPTY(tcStyle)
tcStyle = ""
ENDIF
lnTextWidth = TXTWIDTH(tcString, tcFont, tnSize, tcStyle)
lnAvCharWidth = FONTMETRIC(6, tcFont, tnSize, tcStyle)
RETURN lnTextWidth * lnAvCharWidth
ENDFUNC