Kelie wrote:
> in wxPython, a wx.Grid object has CreateGrid method for which i can specify
> rowCount and colCount argument. i didn't find the same method in dGrid. after
> searching the dabo demo package, it seems grid is created using the addColumn
> method of dGrid object. is this the only way? if so, where do i specify the
> number of rows? thank you.  - kelie

dGrid is designed to show data, so you specify the number of columns 
using ColumnCount, or you add the columns you want explicitly.

You specify the number of rows by assigning a DataSource or a DataSet to 
the grid, and the grid displays all the rows in the DataSource or 
DataSet. A DataSource would be a full-blown bizobj reference, while a 
DataSet can be any sequence of dicts, where each key/value in each dict 
corresponds to your field names and field values.

See the test at the bottom of dabo/ui/uiwx/dGrid.py:

http://svn.dabodev.com/trac/dabo/browser/trunk/dabo/ui/uiwx/dGrid.py#L4275

Run it by simply running "python dGrid.py".


-- 
pkm ~ http://paulmcnett.com


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to