what's the matter with wxPython(Version 2.4.0), It doesn't work crrectly

Nobody nobody at nowhere.near.here
Thu Jan 16 08:15:49 EST 2003


Removing the event.Skip() will do the trick. Don't ask me why ;-).

"Baby" <liaochun at landpage.com.cn> wrote in message
news:b61709d5.0301152142.16f32a48 at posting.google.com...
> I wrote a test program in wxPython.(The GUI Development  is Boa
> constructor ,
> version 0.20).I placed a wxButton on a wxFrame, and I produced a
> wxEVT_COMMAND_BUTTON_CLICKED event . Just like this:
>
>       def OnButton1Button(self, event):
>         dlg = wxMessageDialog(self, 'Message',
>           'Caption', wxOK | wxICON_INFORMATION)
>         try:
>             dlg.ShowModal()
>         finally:
>             dlg.Destroy()
>         event.Skip()
>    but when I click the button , the function is performed two times.
> I don't know what's matter with it. Who can help me, Thanks a lot.
> Sorry my poor English






More information about the Python-list mailing list