AUi pane bind after Maximize

Hi there,
I made a bind like this one:
self.aui_manager(wx.EVT_MAXIMIZE, self.OnMax)

I noticed that the function that I passed(OnMax) is run before the
pane is maximized and I`d like to run this function only after the
window is maximized. Is there something that I should do ?

Thanks.

Cya

Hi,

Hi there,
I made a bind like this one:
self.aui_manager(wx.EVT_MAXIMIZE, self.OnMax)

I noticed that the function that I passed(OnMax) is run before the
pane is maximized and I`d like to run this function only after the
window is maximized. Is there something that I should do ?

Guessing you meant to type:

self.aui_manager.Bind(wx.EVT_MAXIMIZE, self.OnMax)

If the event is sent before the action then you try something like
this if you want to handle it afterwards.

self.aui_manager.Bind(wx.EVT_MAXIMIZE,
                                            lambda event:
wx.CallAfter(self.OnMax, event))

Cody

ยทยทยท

On Fri, Jun 10, 2011 at 8:31 AM, Bruno Bottazzini <ndnaum@gmail.com> wrote: