<<

Contents

Search

>>

 

LPLEN

 

 

Function

 

 

Syntax:

LPLEN(<Type>,<Text>,<Font Style>,<Font Height in TWIPS>[,<Font Width in TWIPS>])

 

<Type>

= <NUM-EXPRESSION>

<Text>

= <STRING-EXPRESSION>

<Font Style>

= <NUM-EXPRESSION>

<Font Height in TWIPS>

= <NUM-EXPRESSION>

<Font Width in TWIPS>

= <NUM-EXPRESSION>

 

 

Meaning:

Returns the length of a print document text as floating-point number.

 

This function only has an effect with ENABLE LPGDI.

 

LPLEN returns the width of <Text> if  <Text> is printed with the font style <Font Style> with the height <Font Height in TWIPS> and the width <Font Width in TWIPS>. The current font defined with LPFONTNAME applies. With DISABLE LPGDI  LPLEN returns the result –1.

 

<Type> specifies in which measure the text width is returned:

 

Type

Measure

1

TWIPS (1 TWIP = 1/20 Point)

2

Point (1 Point = 1/72 Inch)

3

Millimeter

otherwise

Grid coordinates (Columns)

 

Parameter:

Type

Specifies the measure

Text

Text

Font Style

Font style (see LPFONT)

Font Height in TWIPS

Height of font ín TWIPS

Font Width in TWIPS

Width of font ín TWIPS

 

Sample:

/* Center title 15 point bold

TITEL$ = "Customer List"

LPFONAME = "Arial"

TEXT_WIDTH% = LPLEN(1,TITEL$,1,15*20)

LPCURSOR(1,2,(PAGEWIDTH(1) - TEXT_WIDTH%) / 2)

LPFONT = 1 /* Bold

LPRINT UEB$;

 

See also:

LPFONT

LPFONTNAME,

LPRINT

LEN

F_LEN

GET_SUBTEXT_FROM_LPLEN$