Two Listboxes, same columnwidths

I have 2 listboxes. The first one serves as a “pseudo-heading”, the second one is filled with data and has varying numbers of columns, depending on the chosen recordset.
I want the columnwidths of the first “heading-listbox” always the same as the widths of the second one. I tried to use listbox1.columnwidths=listbox2.columnwidths after populating the listbox, and after resizing the window. This doesn’t work, the columnwidths never change.

My second problem is with the vertical Scrollbar, when its added to the listbox2, because of more rows than the window.height can sho, it’s not shown in listbox1, even if i try do set the value to true, using listbox1.scrollbarvertical=listbox2.scrollbarvertical.

Anybody any ideas?

Did you call Invalidate ?

If you display the whole ListBox1 contents, you will never see any ScrollBar, isn’t it ?

Thank you Emile,

no, didn’t call invalidate. To be honest, never heard of this before. I tried it… the columnwidths are fine, but the problem remains with the Scrollbar.

It’s right, i never see the Scrollbar, when the whole content is shown.

Worst: if you use OS X, you may never see the scrollbar at testing time and if you do not meet some conditions, even with a long file.

automatically latches on to a listbox and provides expanded header features.