Hi,
I have a problem with the AutoWidthMixin of a ListCtrl, in combination
with xrc. The pure python examples are perfectly clear but with xrc it
does not work completely yet. I am using two stage creation to setup a
custom AutoWidthListCtrl widget:
Python code:
class AutoWidthListCtrl(wx.ListCtrl, ListMixins.ListCtrlAutoWidthMixin):
def __init__(self):
Pre = wx.PreListCtrl()
self.PostCreate(Pre)
ListMixins.ListCtrlAutoWidthMixin.__init__(self)
self.Bind(wx.EVT_WINDOW_CREATE, self.OnCreate)
xrc code:
<object class="wxListCtrl" name="my_list" subclass="MyApp.AutoWidthListCtrl">
Now when my window is created, the width of the (only, last) ListControl
column is not adjusted to the ListControl window size. But when I resize
the window, it does work.
I guess that I need to call the __init__ method of the mixin
differently, but do not know how. In the xrc code there is no reference
to the mixin class. This might be (part of) the problem. How do I solve
this?
Second remark: it would be very great if an mixin could be enabled with
a checkbox in xrced. For the user, the autowidth feature is just normal
feature like sunken_border
bye,
Martijn