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.

Application skeletons in <strong>wxPython</strong>http://www.zetcode.com/wxpython/skeletons/thel wx.lib module. It is basically a wx.Grid widget with some additionalfunctionality. We set the row size to 20px. This is purely for aestheticalpurpose.control = self.GetParent().GetParent().position<strong>The</strong> position text control shows the selected cell of the grid widget. It isthe first widget of the second toolbar. Being inside a MySheet class, weneed to get a reference to the text control, which is defined in the Newtclass. MySheet is a child of the notebook. And notebook is a child ofNewt. So we manage to get to the position text control by calling theGetParent() method twice.notebook = wx.Notebook(self, -1, style=wx.RIGHT)This is a bug. Under current version of <strong>wxPython</strong> (on GTK+), right isbottom and bottom is right.Browser<strong>The</strong>se days internet browsers are one of the most importantapplications in the IT world. <strong>The</strong> best available browsers are Opera andFirefox. We mimic the look of a Firefox in our script.Figure: Browser.py#!/usr/bin/python8 de 11 27/04/2008 1:07

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

Saved successfully!

Ooh no, something went wrong!