about wxpython and grid, two problems snif ;)

Josiah Carlson jcarlson at uci.edu
Mon Oct 25 17:02:11 EDT 2004


> i need your help for two problemes :
> 
> 1) is it possible to easily hide some row, and recover them ?

Make the row height 0.


> 
> 2) is it possible to have different colours on the label columns?
> for instance, when a row is selected, having the label of THIS row, and 
> only this row, colorised in red ?

Checking the documentation, it seems that one can create a custom cell
renderer (subclass of wx.GridCellRenderer) that used a red background,
or perhaps one that subclassed wx.Grid and made calls to renderers with
the proper 'attr' argument "it will draw the rectangle with the
background colour from attr and set the text colour and font."

Honestly, I've not done this, so I don't know how difficult it would be.

 - Josiah




More information about the Python-list mailing list