what's the matter with wxPython(Version 2.4.0), It doesn't work crrectly
Cliff Wells
clifford.wells at attbi.com
Thu Jan 16 01:35:24 EST 2003
On Wed, 2003-01-15 at 21:42, Baby wrote:
> 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
Hey Baby <wink>,
Sorry, couldn't resist.
Can you post the code where you set up the event handler (i.e.
EVT_BUTTON(...)? What you've posted here looks fine, so I expect the
problem is elsewhere. Do you perhaps have a duplicate id for the
button?
Regards,
AAA, is the <wink> counterproductive by being ambiguous in this context?
--
Cliff Wells <clifford.wells at attbi.com>
More information about the Python-list
mailing list