I use some wx.ListCtrl classes in wx.LC_REPORT mode, complemented by ListCtrlAutoWidthMixin.
The problem is this: when the user double-clicks on the column separator (to automatically resize the column), the column width is set according to the width of the content. This is done by the wx library and resizes the column by a few pixels when the control is empty.
I tried to call
self.SetColumnWidth (colNumber, wx.LIST_AUTOSIZE_USEHEADER)
when creating a list, but it just sets the initial column width, not the minimum allowable width.
Has anyone succeeded in setting a minimum column width?
EDIT: Tried to catch
wx.EVT_LEFT_DCLICK
without success. This event is not raised when the user double-clicks the column separator. Also tried using
wx.EVT_LIST_COL_END_DRAG
this event is usually generated twice for a double click, but I donβt see how I can get information about the new size or how to distinguish a double click from drag & drop. Does anyone have any other ideas?
source share