Hi
I'm trying to print out the contents of a ListBox. I found some good
examples on the net for doing the output. I figured out that you can
help the user choose landscape by popping up the PageSetupDialog.
The problem I'm having now is cellspacing. All of the examples I've
encountered assume that all columns are equal width and do something
like:
w = g.Width / ListBox.ColumnCount
then they (I) do a DrawString using nested for loops and setting
DrawString's X to be (y*w) which sets every field to be exactly the
same width, with an incrementing y being the multiplier of w sort of
like this:
for x = 0 to ListBox.ListCount-1
for y = 0 to ListBox.columnCount-1
g.DrawString ListBox.cell(x,y), (y*w), (x*h)+h
next
next
(I haven't included the Dims for all vars in this example obviously)
The resulting Print Preview on OS X Tiger is a mess of overlapping
cell content. Some fields are text strings of about 30 chars and some
are price fields of about 6 chars. I'm just wondering if anyone has
an elegant and wonderful way of cleaning this up, and making me look
like a hero?
Thanks in advance!
Best Regards,
Stephen
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>