Mercurial > hg > FederatedLinda
view scripts-java/visualizer/hello2.py @ 63:b342dc9b52eb
add document
author | axmo |
---|---|
date | Tue, 24 Feb 2009 17:59:45 +0900 |
parents | 1809e2b05824 |
children |
line wrap: on
line source
import wx class MyApp(wx.App): def OnInit(self): frame = wx.Frame(None, -1, f_label) self.n_pressed = 0 label = "Hello! (%d)" %(self.n_pressed) self.button = wx.Button(frame, -1, label) self.button.Bind(wx.EVT_BUTTON, self.myButtonHandler) self.SetTopWindow(frame) self.frame.Show(True) return True def myButtonHandler(self, evt): self.n_pressed += 1 label = "Hello! (%d)" %(self.n_pressed) self.button.SetLabel(label) app = MyApp(0) app.MainLoop()