Ed Leafe wrote:
I have a wxGrid subclass that contains a wx.GridTableBase that deals with various types of data. I'd like to render the boolean columns using grid.SetColFormatBool(), but I'm running into a problem: the cells all display checked values, even if the underlying data is False.
I've tried overriding the grid and table's Get/SetValue, since I originally thought the problem was due to the grid returning the string 'False' and not the boolean False, but none of those seem to work. What do I need to do to have a boolean column properly display?
The renderer first calls the table's CanGetValueAs(row, col, wxGRID_VALUE_BOOL) and if it returns true then it calls GetValueAsBool(row, col), otherwise it gets the value as a string and if it is empty or "0" then it renders as false, otherwise it renders as true.
···
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!