13.07.2015 Views

The wxPython tutorial

The wxPython tutorial

The wxPython tutorial

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

http://www.zetcode.com/wxpython/tips/self.blick = self.blick + 1if self.blick == 25:self.statusbar.SetBackgroundColour('#E0E2EB')self.statusbar.Refresh()self.timer.Stop()self.blick = 0app = wx.App()Isabelle(None, -1, 'Isabelle')app.MainLoop()<strong>The</strong>re is a wx.TextCtrl on the Statusbar. <strong>The</strong>re you enteryour commands. We have defined three commands. /bye,/about and /beep. If you mistype any of them, Statusbarturns red and displays an error. This is done with thewx.Timer class.Undo/Redo frameworkMany applications have the ability to undo and redo theuser's actions. <strong>The</strong> following example shows how it can beaccomplished in <strong>wxPython</strong>.5 de 15 27/04/2008 1:09

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!