hmCal_GetStringWidth

hmCal_GetStringWidth(Text;Font;Fontsize;Fontstyle) -> width

Parameter          Type             Description
Text               Text         ->  Text
Font               String       ->  Fontname
Fontsize           Longint      ->  Fontsize
Fontstyle          Longint      ->  Fontstyle
width              Longint      <-  string width in pixels

Description

The command hmCal_GetStringWidth returns the width of a string, defined by font, fontsize and fontstyle. You can use the predefinied constants of 4D in the parameter Fontstyle.

Example

The following example returns the string width of a text:
C_LONGINT($vl_width)

$vl_width:=hmCal_GetStringWidth("Test";"Arial";10;Bold+Italic)