Ed Leafe wrote: > On Jun 29, 2007, at 12:28 PM, johnf wrote: > >> How can I use a class in a cell of a grid. I have a class that >> changes the >> display but always returns a 'int". I noticed that dGrid uses >> renderer >> classes. Does that mean I have to write a special renderer class >> to make >> this work? > > Yes. Renderers and Editors control the display of grid cells. See > the gridRenderers.py file in the uiwx directory for examples.
Way way in the future (Dabo 2.0?) I can picture being able to say something like:
class MyListBox(dabo.ui.dListBox): ...
myListBox = grd.Columns[1].addObject(MyListBox)
... and then Dabo takes care of the editor/renderer under the covers because we have editors/renderers for all the ui classes.
-- pkm ~ http://paulmcnett.com
©2007 Paul McNett |