[Tutor] how to post an event?
Jeff Peery
jeffpeery at yahoo.com
Mon Jul 10 22:16:40 CEST 2006
Ah, yes it works, thanks. I had previously tried to simply call the function (OnButton1Button() from OnButton2Button()) instead of posting an event but I guess I did this wrong and abandoned the effort assuming that it wouldn't work. Anyhow, I got it working now, thanks again!
Jeff
Alan Gauld <alan.gauld at freenet.co.uk> wrote: > Hello, I am having a bit of trouble figuring out how to post an
> event.
Do you really need to post an event?
> self.button2.Bind(wx.EVT_BUTTON, self.OnButton2Button,
> id=wxID_FRAME1BUTTON2)
could you just bi8nd the same method to both buttons?
> def OnButton1Button(self, event):
> print 'hello'
>
> def OnButton2Button(self, event):
> event.Skip()
> """what do I do here to post an event that executes
> 'OnButton1Button()' ?"""
Or could you call OnButton1Button(self,event) directly?
Does it have to involve an event being posted to the Q - sometimes
needed I know but not often...
Alan G.
>
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1ยข/min.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060710/e0e72541/attachment.html
More information about the Tutor
mailing list