This works fine on linux but on windows, the WINDOW_CREATE event does not happen
and thus the post creation code is not executed (both python 2.4 wxPython
2.6.3.3). Every other control I subclassed so far, using the appropriate
wx.PreXXXCtrl() method, does not have this problem. What can I do to have that
event launched?
This works fine on linux but on windows, the WINDOW_CREATE event does not happen
and thus the post creation code is not executed (both python 2.4 wxPython
2.6.3.3). Every other control I subclassed so far, using the appropriate
wx.PreXXXCtrl() method, does not have this problem. What can I do to have that
event launched?
I've had this problem with native widgets on Windows before. The issue is that in order for window messages to be sent to the wx WndProc where they can be turned into wx Events, the native window first needs to be "subclassed" (in the Windows API sense) but for the native controls that can't happen until after the creation is done. IIRC there was some workaround checked in recently for 2.7 but I don't know any details about the change or if it can be backported to 2.6.
If the above is all you are doing in the create handler then I think I would just try moving the wx.CallAfter(self._PostInit) to the __init__ and see if that does what you need.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
> wx.PreXXXCtrl() method, does not have this problem. What can I do to have
> that event launched?
[..]
If the above is all you are doing in the create handler then I think I
would just try moving the wx.CallAfter(self._PostInit) to the __init__
and see if that does what you need.