On Saturday 28 November 2009 02:31:19 pm Mike wrote:
> In a word is it possible?
> I have used the Datatype 'list' in a grid with success but would really
> like a key value to be placed in the data field not the displayed string
> ie a key look up process
>
> I notice that in dGrid.py dColumn I can specify custom Editor and Render
> classes ( not sure how ) and that there already exists a class
> GridListEditor with the value mode set to 'string' (this class is not
> used at present)
>
> 1. How can I set up a new class based on GridListEditor where I set the
> Valuemode = 'key', and also load up the key values.
> I haven't set up derived classes before so I'm unsure of how to approach
> this
> 2. having set up a class is the CustmoEditorClass property a string or
> an object instance
> 3. Do I still set the DataType to list
> 4. Am I right in assuming that the renderclass dose not require
> modification ie it will be wx.grid.GridCellStringRenderer - the same as
> the list DataType
>
> Thanks
> Mike Ayers

The best example of creating a custom list editor would be dGrid.  Look at the 
test code.   All the normal settings apply (to my knowledge) - so just set 
the DataSource and DataField and allow Dabo to handle the data type. 

Johnf


_______________________________________________
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]

Reply via email to