[wxPython] EVT_LEAVE_WINDOW and friends...

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[wxPython] EVT_LEAVE_WINDOW and friends...

dj trombley

I'm somewhat baffled by the fact that I cannot seem to get
certain event bindings to work... I'm assuming that either these
are not yet supported or that I am making some simple error
(not marking the window to receive these events somehow?)  There
are no examples in the demo using EVT_LEAVE_WINDOW or EVT_ENTER_WINDOW,
but I have assumed that they operate in a similar fashion to the
other bindings, (ie. EVT_LEAVE_WINDOW(<window>,<function>))

In particular, if these bindings are supported, what magic must
be added to make the following simple example produce the obviously
expected output?

from wxPython.wx import *

class TestFrame(wxFrame):
    def __init__(self):
        wxFrame.__init__(self,NULL,-1,"Test Frame",wxPoint(200,200))
        EVT_LEAVE_WINDOW(self, self.onLeave)
        EVT_ENTER_WINDOW(self, self.onEnter)
    def onLeave(self, event):
    def onEnter(self, event):
class MyApp(wxApp):
    def OnInit(self):
        self.mainFrame = TestFrame()
        return true
def main():
    app = MyApp(0)

Thanks once again in advance...


wxPython-users maillist  -  [hidden email]