Printing listbox with column word-wrapped

I have a function to print a listbox and I have a function to word wrap a string to a set number of characters.
Some columns in the listbox have text which needs to wrap on the next line. Done no problem.
After that I want the next listbox row to print below the last bit of word-wrapped text.
I presume I need to measure the height of the word wrapped text and add that to my y position. How do I do that.

'Leave top margin then print header
yRow = 72

g.Bold = false
yRow = yRow + 4
g.DrawLine 0, yRow, g.width, yRow // draw a line under header

For yCounter =0 to listboxName.ListCount - 1
x =20
yRow = yRow + g.TextSize + 2
For xCounter = firstColumn to listboxName.ColumnCount - 1
if listboxName.Column(xcounter).WidthActual <> 0 then //don’t print hidden columns
dim wrappedString as string = WordWrap(listboxName.Cell(yCounter, xCounter),20) // wrap text to max 20 characters
g.DrawString (wrappedString, x, yRow)
if instr(0,wrappedString,chr(13))<> 0 then // test if text needed wrap
yRow = yrow + ??? //Set y for next row
end if
end if
xColumnWidth =listboxName.Column(xcounter).WidthActual
x = x + xColumnWidth
Next xCounter[/code]

If you download my sbPrinter classes from my website you can see that I have done just that within. I don’t have time at present to find the relevant code but the classes are free and open source so you can look through those.

Download from here.

Thankyou. Exactly what I need (and so much more).
So kind of you to share this code.
I haven’t looked at the other projects you have uploaded but I’m sure it’s all very useful.