How to set a background colour to a grid

Hi

the unoccupied space in a grid (= has no cells on it) is always shown in white. I would like to change it into gray. How do I do that?

The following tries did not work out:

grid.SetBackgroundColour(wx.Colour(190, 190, 190))
grid.GetGridWindow().SetBackgroundColour(wx.Colour(190,190,190))

The "unused" background remains white... any other proposals.

Greetings,
Marco

Marco Aschwanden wrote:

Hi

the unoccupied space in a grid (= has no cells on it) is always shown in white. I would like to change it into gray. How do I do that?

The following tries did not work out:

grid.SetBackgroundColour(wx.Colour(190, 190, 190))
grid.GetGridWindow().SetBackgroundColour(wx.Colour(190,190,190))

The "unused" background remains white... any other proposals.

http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?8:mss:59776:200405:mpkndikfbofiohcefgil

ยทยทยท

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

The "unused" background remains white... any other proposals.

http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?8:mss:59776:200405:mpkndikfbofiohcefgil

Thanks for the link... here is the solution that works for wxPython:

defaultColor = wx.SystemSettings.GetColour(wx.SYS_COLOUR_3DFACE)
grid.SetDefaultCellBackgroundColour(defaultColor)

I hope this helps someone else.

Thx,
Marco