On Aug 30, 2005, at 10:35 AM, Adi J. Sieker wrote:
The question now is what is the Dabo way of filling the ListCtrl
with data from the rows in the BizObj?
Well, right now there isn't a direct way, but that's mostly
since we haven't used the dListControl much in our apps. The brute
force way is to do something like this in the form:
lc = dabo.ui.dListControl(self)
lc.setColumns("First Name", "Last Name")
recs = self.getPrimaryBizobj().getDataSet()
for rec in recs:
lc.append(rec["first"], rec["last"])
This assumes that your data has columns named 'first' and
'last', and the your bizobj has already run a query to fetch the
desired data. You might also need some way to store the PK if you
then want to act on any rows the user selects. You can add another
column for the PK, and set its width to 0 using
dListControl.setColumnWidth().
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users