Report_GetStringWidth()

Examples


The Report_GetStringWidth() returns the width of a string using the font, font size and font style specified.

Syntax

Report_GetStringWidth(font, font_size, font_style, string)

Parameters

font – An integer specifying the font to use for the text. The value corresponds to one of the following constants:

[spacer]

Constant

Description

FONT_COURIER

Courier font

FONT_HELVETICA

Helvetica font

FONT_TIMES

Times font


font_size – An integer specifying the size of the font, measured in points.

font_style – An integer specifying the style to use for the font. The values correspond to the following constants:

[spacer]

Constant

Description

FONT_STYLE_PLAIN

Plain text

FONT_STYLE_BOLD

Boldface text

FONT_STYLE_UNDERLINE

Underlined text

FONT_STYLE_ITALIC

Italicized text


You can add these constants together to apply multiple style characteristics. For example, FONT_STYLE_BOLD+FONT_STYLE_UNDERLINE causes the text to be boldfaced and underlined.

string – The string whose width will be returned.

Return value

An integer containing the width of the string, measured in points.

Comments

You can use the Report_GetStringWidth() function to verify that a string will fit on a page.


Documentation Feedback