EVT_LEAVE_WINDOW Test

Try this, it *may* work:

         id = wxNewId()
         wxFrame.__init__(self, parent, id, "EVT_LEAVE_WINDOW Test",
                          size=(400,120))
         EVT_CLOSE(id, self.OnCloseWindow)
         EVT_LEAVE_WINDOW(id, self.OnLeaveWindow)

/Jean Brouwers

Thanks for replying, but:

- I wouldn't pass an integer instead of 'self' when hooking an event :wink:
- if I pass 'id' as parameter to __init__() only it still doesn't work.

Cheers,

Cristina.

Sorry, my fault.

There are two different EVT_ signatures, EVT_(self, func)
and EVT_(self, id, func) but there is no EVT_(id, func).
Both _CLOSE and _LEAVE_WINDOW are of the first kind.
There is one example in the demo dir, wxDragImage.py which
uses EVT_LEAVE_WINDOW.

HTH, /Jean Brouwers

···

On Sunday, November 23, 2003, at 12:52 PM, C. Iacob wrote:

Try this, it *may* work:

         id = wxNewId()
         wxFrame.__init__(self, parent, id, "EVT_LEAVE_WINDOW Test",
                          size=(400,120))
         EVT_CLOSE(id, self.OnCloseWindow)
         EVT_LEAVE_WINDOW(id, self.OnLeaveWindow)

/Jean Brouwers

Thanks for replying, but:

- I wouldn't pass an integer instead of 'self' when hooking an event :wink:
- if I pass 'id' as parameter to __init__() only it still doesn't work.

Cheers,

Cristina.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org