styledTextPrinter - find out the number of lines needed

Hi everybody,

i´d like to print some lines from a listbox, then a styledtextprinter Object, and then again some lines from another listbox. Therefore i´m using a graphics Object. Printing single lines out of the listboxes is no problem, printing the styledTextprinter with drawBlock - no problem. But how can i get the number of lines my DrawBlock has used for figuring out the next “free” line for printing my next contents?

A hint would be nice!

Thanks, Christian

Graphics.StringHeight ?

just working for a single line - thats how I read it. But i will try…

No, Graphics.StringHeight is not Graphics.StringHeightFor OneLine ;-:slight_smile:

Returns as an Integer the height of the text…

ok - now after a really nice breakfast i will try

And I was thinking I awoke later today (at 9 vs 7 on the other days of the week !)

PS: sometimes, programming before breakfast is good too (I often do that when I awoke with a solution of yesterday’s problem).

well - wake-up time is relative… :wink:

yesss it works

Thanx, Emile!

You’re welcome