Strange ListBox.ColumnWidths values…

The code below:
[I forget to say That I do not set any ColumnWidths value at this stage]

Function MouseDown(X As Integer, Y As Integer) Handles MouseDown as Boolean
  MessageBox LB.ColumnWidths
End Function

gaves me:
1.526145*, 1.319788*, 6.216683*, 2.161959*, 1*, 5.900656*

I was wanting to get the fixed (absolutes) values IN PIXELS to be used in the IDE, Column Widths…

Instead of fixing random values until I got the correct ones… (or compute them Column after Colum… Row after Row).

Worst: the values are false: I have 6 columns, LB.Width is 960 and the third value is >6.2; so (960/6) * 6 = larger than LB.Width when I add all Columns Widths…

After some try/run/try processes, I determined these values:
80, 80, 300, 100, 50, 360

I may be wrong.

Just out of curiosity, did you look at Listbox.Column(x).WidthActual?


It was a “single check for all” instead of “try a value and if not OK, try another”.

I set the column width with the Mouse, and when I liked them, I asked Wojo for them (using the already shared code):
I get the set with as pixels values and now I am happy.

The easier, the better.

PS: it was a one time design set value (I hope).