it seems that there are some problems with ListBox().WidthActual,
If you create a window then drop a listbox and then add in the open event of the listbox the size and the headers and the size of each cell, even if you set values that in total are bigger than the listbox size it seems that the horizontal bar is never fired and you cannot scroll on horizontal.
If you put the sizes in the IDE under the ColumnWidths it works.
Is that a bug or i just understood wrong the usage of this property .
// This does NOT work:
Dim columnWidth As Integer = 1.2 * Me.Width / Me.ColumnCount
Me.Column(0).WidthActual = columnWidth
Me.Column(1).WidthActual = columnWidth
Me.Column(2).WidthActual = columnWidth
Me.Column(3).WidthActual = columnWidth[/code]
The latter sets the columns to the correct width but the horizontal scrollbar does not appear.
So another funny part is that if i put the Column widths like this 200, 230, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70 even if all the sizes are there still don`t see horizontal scroll bar.
Ok so it seems that if on ColumnCount in the IDE you put a different number than the actual columns in the code it creates this issues.
so i did a test , i put 1 in ColumnCount in the IDE and i put me.columnCount = 22 so the open event does not override the IDE settings, if on the other hand i put the correct number in the IDE i have the needed functionality on the Horizontal scroll bar but again only when i have the sizes set in the Column Widths .
So it seems that the open event does not override the control default settings.
No, not at all. Read the documentation and you will see what you have to do to get the horizontal scrollbar (set a fixed value to all columns; these values can be different, but have to be fixed: 10, 200, 155 ).
Actually, I have one hide (zero-width column) for every 3 regular columns. On occasion, those are opened up wider to reveal their content, but they’re frequently hidden - and the horizontal scrolling isn’t affected by their width (given that they’re always a fixed width).