From: Ronny De W. <ron...@gm...> - 2005-02-27 13:22:59
|
Liam Clarke wrote: >def on_Test_mouseClick(self, event): > print "*** button clicked" > # why can i not disable the button with: > self.components.Test.enabled = False > > time.sleep(5) > self.components.Test.enabled = True > >Because, you're not repainting in there - alternately, you could use >wx.timer instead. >(This is straight copy and paste from the Pythoncard manual.) > >You have to force a repaint, iirc, and how do that is >buried deep within wxPython. > > > I tried with self.components.Test.Update() after disabling the button, without success. wx.timer is no alternative for me, in fact i don't sleep(5) but do some processing for about 5 secs (didnt post the whole processing since it is not relevant to the problem). Forcing the repaint is the message, but how ? How to best explore the deeply buried functionality of wxPython/wxWidgets ? Do you use specific tools for that ? published API documentation on the internet ? dynamic exploration via debuggers, ... ? A couple of days ago i posted a similar question about autosizing the columns of a multicolumnlist. Also there the answer is probably buried in wxPython/wxWidgets. What is the fastest way to find the answer to these kind of problems ? Best regards, Ronny De Winter |