I'm not a fan of that row of column width constants - especially the +3
How about:
And calling with
That said, I probably would have extended the wxListCtrl and placed this code in there, to prevent all this ListControl argument passing.
How about:
Method GetColumnWidth:Int(_list_control:wxListCtrl,_col:Int) Local width:Int For Local column:Int = 0 Until _list_control.GetColumnCount() If column <> _col Then width :+ _list_control.GetColumnWidth(column) Next If width Local listbox_width:Int Local dummy:Int _list_control.GetClientSize(listbox_width,dummy) width = Max(0,listbox_width - width) EndIf Return width End Method
And calling with
ListControl.SetColumnWidth(4,GetColumnWidth(ListControl,4))
That said, I probably would have extended the wxListCtrl and placed this code in there, to prevent all this ListControl argument passing.