Paul,
I'm sure I'm just one of many who are trying out dabo for the first time. Unfortunately, the sample code fails at
>>> grd.addColumn(Caption = "Last Name", DataField = "last_name")
TypeError: addColumn() got an unexpected keyword argument 'Caption'
For us newbies, what's the right way to do this? Do we need to create some dColumns first and add them (tried it, didn't work).
Thanks,
Steve
···
Subject:
Re: [wxPython-users] wxGrid update
From:
Paul McNett <p@ulmcnett.com>
Date:
Tue, 16 May 2006 11:11:39 -0700
To:
wxPython-users@lists.wxwidgets.orgTo:
wxPython-users@lists.wxwidgets.orgIf you are new to wxPython it may be early enough to convince you to give Dabo a try. Dabo is a 3-tier database application development framework, where the UI tier wraps wxPython into a simplified layer.
You can forget about using the db and biz tiers and just use the ui tier instead of using wxPython directly, and your grid problem can be solved with the following code:
#-- begin sample code
import dabo
dabo.ui.loadUI("wx")app = dabo.dApp()
app.setup()# populate your dataset from a database, but here's a sample:
ds = ({"last_name": "McNett", "first_name": "Paul"},
{"last_name": "Bundy", "first_name": "Bud"})grd = app.MainForm.addObject(dabo.ui.dGrid)
grd.DataSet = ds
grd.addColumn(Caption="Last Name", DataField="last_name")
grd.addColumn(Caption="First Name", DataField="first_name")app.start()
#-- end sample code
Click on the column headers to sort, type into the grid to search.