Paul, *please* post your dabo questions to the dabo-users list instead of to me personally. I'm taking this back on list.
Paul McNary wrote: >> The dGrid test does a deop-down color picker. Do: >> >> cd dabo/dabo/ui/uiwx >> python dGrid.py >> >> and then look at the test code at the bottom of dGrid.py. >> >> Paul >> > I don't see where DataType is being set to 'list'. > > Does this have to be done manually or can it be done in Class Designer > somehow? I see ListEditorChoices in Object Info for Grid Column but not > CustomEditorClass? > > Is it just the ListEditorChoices line and CustomEditorClass line that > make this a listbox column? Yes. The choices in the list come from the list in dabo.dColors.colors, and the fact that we want the custom editor is my setting it to the column object's listEditorClass attribute. > ----------------------------------------------------------------------- > from dGrid Test (dGrid.py) > > col = dabo.ui.dColumn(self, Name="Color", Order=40, DataField="color", > DataType="string", Width=40, Caption="Favorite Color", > Sortable=True, Searchable=True, Editable=True, Expand=False) > > self.addColumn(col) > > col.ListEditorChoices = dabo.dColors.colors > col.CustomEditorClass = col.listEditorClass > ----------------------------------------------------------------------- You got it! Paul _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]
