PrintWidth – PB Docs 2021

PrintWidth

PowerScript function

Description

Determines the width of a string using the current font of the
specified print job.

Syntax

Argument

Description

printjobnumber

The number the PrintOpen function assigned to the print
job

string

A string whose value is the text for which you want to
determine the width

Return value

Integer. Returns the width of string in thousandths of an inch using
the current font of printjobnumber if it succeeds and -1 if an error
occurs. If any argument’s value is null, PrintWidth returns null. If the
returned width exceeds the maximum integer limit (+32767), PrintWidth
returns -1.

Examples

These statements define a new blank page and then set W to the
length of the string PowerBuilder in the current font and then use the
length to position the next text line:

See also

PrintClose

PrintOpen


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x