wxListCtrl - Mac quirk

BlitzMax Forums/Brucey's Modules/wxListCtrl - Mac quirk

Brucey(Posted 2008) [#1]
This would appear to be a bug(?) in the Mac wxWidgets implementation of wxListCtrl.
Took me a while to suss out why it wasn't doing what I expected, but I have a little workaround too (after browsing the source).

When adding columns to a wxListCtrl, if your columns end up wider than the control itself, a horizontal scrollbar should appear. It doesn't always.
The way to make it show up is to push a Size event at the control, which internally makes it check the column widths against the width of the control, and thus makes the scrollbar appear. Of course, one might have thought they would do this check when you add a column... but there you are.

A workaround is to have something like this :
	Function UpdateList(list:wxListCtrl)
		Local w:Int, h:Int
		list.GetSize(w, h)
		list.SetSize(w, h)
	End Function

which you can call whenever you've added your columns and there isn't likely to be a normal size event.
For example, I've found that a wxListCtrl in a dialog sorted itself out.

RIght... how to raise a bug with wxWidgets...... :-p