Set the Grid Background Colour

Greetings,

Is it posible to set the background colour of a Grid window ?

By that I don’t mean the cells, (or the panel), I mean the area around the right and bottom edges between the outer most row/col and the grid’s scrollbars, no mans land, so to speak.

I have tried SetBackgroundColour(colour) / SetBackgroundStyle(style), they were ignored.

I have also tried painting it manually from the EVT_ERASE_BACKGROUND event, which almost worked, you could see my chosen colour shimmering around the edges when you resized the window.

It doesn’t pick up the colour from its parent window either, the grid backgound seems to be tied to the system window background, usually white.

Am I missing something obvious ?

Thanks,

Shane

Windows XPsp2, Python 2.5, wxPython 2.6.3.3

shane@strategygroup.cc wrote:

Is it posible to set the background colour of a Grid window ?

[snip]

Am I missing something obvious ?

I would guess:
    grid.GetGridWindow().SetBackgroundColour(colour)

Which isn't terribly obvious, and may or may not work.

- Josiah

> Is it posible to set the background colour of a Grid window ?
[snip]
> Am I missing something obvious ?

I would guess:
    grid.GetGridWindow().SetBackgroundColour(colour)

Which isn't terribly obvious, and may or may not work.

- Josiah

Hmmm... thank you but nope, no joy...

...Solved :slight_smile:

After trawling though the source, SetDefaultCellBackgroundColour(colour) will do it.

Thanks,
Shane

···

shane@strategygroup.cc wrote: