Hi,

Dabo 3,Python 3.6

The issue is the
CustomRendererClass class is never called.  The initial dataset for the grid is empty and the dataset is populated after a few parameters are set.  When the dataset is populated the values are displayed correctly without the background color changes.

In the past I have used a CustomRendererClass to change the background color of a grid cell based on the bool value of the column value for the cell.

If the data value was True I turned the background color green and if False I use red for background color of the cell also set the string value.  I set the renderer as follows:

        col = dColumn(self,  Order=10, DataField="here",
                              DataType="string", Caption="Attended",
                              Sortable=False, Searchable=False, Editable=False, Expand=False, HorizontalAlignment = 'Center')
        col.CustomRendererClass = AttenRedGreenBoolRenderer

        self.addColumn(col)


I reviewed what was done in dGrid but that was a CustomEditorClass (also used a method makeGridEditor).  So is the thinking that a CustomRendererClass is not needed.  wxPython provides several types of renderers.


Johnf





--- StripMime Report -- processed MIME parts ---
multipart/alternative
 text/plain (text body -- kept)
 text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/[email protected]

Reply via email to