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/Besides fixing this bug, I also cleaned the code a bit and replaced thedepreciated methods (AddSimpleTool()) of the toolbar with the newones (AddLabelTool()).Figure: Spreadsheet#!/usr/bin/python# spreadsheet.pyfrom wx.lib import sheetimport wxclass MySheet(sheet.CSheet):def __init__(self, parent):sheet.CSheet.__init__(self, parent)self.row = self.col = 0self.SetNumberRows(55)self.SetNumberCols(25)for i in range(55):self.SetRowSize(i, 20)def OnGridSelectCell(self, event):self.row, self.col = event.GetRow(), event.GetCol()5 de 11 27/04/2008 1:07

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

Saved successfully!

Ooh no, something went wrong!