I want to get the width of a string in a Cell (ListBox).
So, I store in variables:
a. the ListBox Font Name
b. the ListBox Text Size
I create a special purpose Picture: MyPict = New Picture(0,0)
then MyPict = New Picture(600,40)
I set its Graphics Font to a, Size to b (read above)
And, with:
CellWidth = MyPict.Graphics.StringWidth(CellString)
All I get is a shorter width !
Ah, I forgot (never type a text while you are in a hurry !): I use that to set the ListBox column width.
Am I doing something wrong ?
(real code is not handly, but instructions above are what I coded).