Datagrid-Widget for Python?
Tim Gahnström /Bladerman
tim at bladerman.com
Mon Apr 7 19:01:46 EDT 2003
"Rainer Klueting" <rainer.klueting at epost.de> wrote
> can anybody point me to a source where I can find a datagrid-widget to
> use with Python? It should basically show a flat table in a
> spreadsheet-like way. I tried for a while to do it by myself using
> Tkinter, but I'm lacking experience (just trying to change that...)
wxPython is a guitoolkit with a good datagrid widget.
First you must install wPython, http://www.wxpython.org/ but once that is
done you could write a small app like this if I am not mistaken
from wxPython.wx import *
from wxPython.grid import *
class MyFrame(wxFrame):
def __init__(self, parent, title):
wxFrame.__init__(self, parent, -1, title, size=(350, 200))
grid=wxGrid(self, -1, size=(150,150))
grid.CreateGrid(4,4)
app = wxPySimpleApp()
frame = MyFrame(None, "Simple wxPython Grid")
frame.Show(True)
app.MainLoop()
Then you an have a look at the wxGrid widget wich is qiute extensive.
Good luck
Tim
More information about the Python-list
mailing list