I have a wx.grid and am trying to change a row background colour, but
am stuck, cant find a list of available wx.grid attributes, ... so
trying things like ...
I have a wx.grid and am trying to change a row background colour, but
am stuck, cant find a list of available wx.grid attributes, ... so
trying things like ...
You need to create an instance of GridCellAttr to pass to SetRowAttr.
Also in a wx.grid, if I want one col to expand to use all available
space, which is the best solution ?
You could do something similar to the ListCtrlAutoWidthMixin in wx.lib.mixins.listctrl, basically recalculate the size needed to fill the available space in the grid's EVT_SIZE event and then set the column to that size.
I have a wx.grid and am trying to change a row background colour, but
am stuck, cant find a list of available wx.grid attributes, ... so
trying things like ...
You need to create an instance of GridCellAttr to pass to SetRowAttr.
OK so I
# TEST CODE
attr = wxgrid.GridCellAttr()
attr.SetBackgroundColour('#00FF00')
grid.SetRowAttr(2, attr)
And it ow works
Also in a wx.grid, if I want one col to expand to use all available
space, which is the best solution ?
You could do something similar to the ListCtrlAutoWidthMixin in
wx.lib.mixins.listctrl, basically recalculate the size needed to fill the
available space in the grid's EVT_SIZE event and then set the column to that
size.
OK a bit more challenging but got there, was thinking there would be a
simple attribute somewhere !, this wx widget set is pretty cool, my
application is looking good already, even with me being a noobe,
Thanks for your help
Dave
···
On 26 December 2011 18:51, Robin Dunn <robin@alldunn.com> wrote: