Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control the length of unknown string

Status
Not open for further replies.

Grizz2

Programmer
Dec 4, 2001
52
US
Well I've got another one for all you smart folks out there.
I want to send a string from a file to the printer object. If the string is too long for 1 line, is there a way to make it wrap to another line instead of printing off the edge of the page?
Thanks
Grizz
 
check into printer.textwidth. It will give you the &quot;length&quot; of the string as printed -incl the font and size stuff. You can then check if the printer.scale width - printer.currentx < printer.textwidth ... some math and you can know ... If necessary adjust ...


MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top