wxPython update problem
Peter Hansen
peter at engcorp.com
Mon Apr 7 07:06:08 EDT 2003
Nils Grimsmo wrote:
>
> class MainWindow(wxFrame):
> label = ["foo", "bar"]
> button = None
> def __init__(self, parent, id, title):
> wxFrame.__init__(self, parent, -4, title, size = (100, 100))
> self.button = wxButton(self, 13, self.label[0])
> EVT_BUTTON(self, 13, self.run)
> self.Show(true)
>
> def run(self, event):
> for c in range(2):
> for x in [0, 1]:
> self.button.SetLabel(self.label[x])
> # please update. pretty, please!
> time.sleep(1.0)
When do you think/hope run() will be called? I don't think that
method is looked for by wxPython... Did you base this on
some sample code?
-Peter
More information about the Python-list
mailing list