WebListbox Opening vs Shown

I have this code in the Opening event for Listbox1 and the same in the Shown event for Listbox2:

Me.ColumnCount = 3
Me.HeaderAt(0) = "Uno"
Me.HeaderAt(1) = "Dos"
Me.HeaderAt(2) = "Tres"
Me.ColumnWidths = "100,100,100"
For i As Integer = 0 To 6
  Me.AddRow("This is the first column", "second", "third column")
Next i

This is how it looks when I debug:

The header is empty for Listbox2 and it is a little ‘taller’ than Listbox1 (both are 400 x 360)

At this time, you should be setting up the columns for your listbox in the IDE or in the Opening event. The Shown event is too late because of a bug.

2 Likes