Insert Date on wxGrid

Hello,

I am looking on wxPython Demo (Core Windows/Controls -> wxGrid -> wxGrid using
a custom Table, with non-string Data). How can I customize it so that I can
insert a date inside the cell?

Dax

Dakila Reyes II wrote:

Hello,

I am looking on wxPython Demo (Core Windows/Controls -> wxGrid -> wxGrid using a custom Table, with non-string Data). How can I customize it so that I can insert a date inside the cell?

There is the wxGRID_VALUE_DATETIME type specifier and a wxGridCellDateTimeRenderer class, but it doens't look like they are really doing much yet.

If you create your own renderer and editor classes then you can associate them with a type string using

    grid.RegisterDataType(typename, aRenderer, anEditor)

and then the table can use the typename as in the demo with the predefined types to have the grid automatically choose the editor and renderer for cells with that type.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!