wxGrid,SetRowAttr Help

Newbie Question about SetRowAttr(int row, wxGridCellAttr* attr).

During a row selection, I would like the entire row to become
highlighted in blue, for example. The row selection is occuring when the
row label is clicked.

I would appreciate it if someone can provide a short example, showing
the format of SetRowAttr in the wxGrid. I have a problem when I try to
put in the wxGridCellAttr for SetBackgroundColour.

Thank you,

Keith

Keith Bolton wrote:

Newbie Question about SetRowAttr(int row, wxGridCellAttr* attr).

During a row selection, I would like the entire row to become
highlighted in blue, for example. The row selection is occuring when the
row label is clicked.

assuming grid is your Grid instance :

grid.SetSelectionMode(1)

will highlight the entire row when selecting a cell

>Newbie Question about SetRowAttr(int row, wxGridCellAttr* attr).
>
>During a row selection, I would like the entire row to become
>highlighted in blue, for example. The row selection is occuring when
the
>row label is clicked.
>
>
>
assuming grid is your Grid instance :

grid.SetSelectionMode(1)

will highlight the entire row when selecting a cell

The documentation at http://wiki.wxpython.org/index.cgi/wxGrid talks about
using wxGrid::wxGridSelectCells etc (wxGridSelectRows == 1 I presume)
which isn't defined anywhere as far as I can see. Surely this should be in
grid.py?

Hugh

Hugh Gibson wrote:

Newbie Question about SetRowAttr(int row, wxGridCellAttr* attr).

During a row selection, I would like the entire row to become
highlighted in blue, for example. The row selection is occuring when

the

row label is clicked.

assuming grid is your Grid instance :

grid.SetSelectionMode(1)

will highlight the entire row when selecting a cell

The documentation at http://wiki.wxpython.org/index.cgi/wxGrid talks about using wxGrid::wxGridSelectCells etc (wxGridSelectRows == 1 I presume) which isn't defined anywhere as far as I can see. Surely this should be in grid.py?

It is an attribute of the class. In 2.4 it is wxGrid.wxGridSelectRows and in 2.5 is is wx.grid.Grid.wxGridSelectRows with a slightly easier alias: wx.grid.Grid.SelectRows.

···

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

> The documentation at http://wiki.wxpython.org/index.cgi/wxGrid talks
> about using wxGrid::wxGridSelectCells etc (wxGridSelectRows == 1 I
> presume) which isn't defined anywhere as far as I can see. Surely
> this should be in grid.py?

It is an attribute of the class. In 2.4 it is wxGrid.wxGridSelectRows
and in 2.5 is is wx.grid.Grid.wxGridSelectRows with a slightly easier
alias: wx.grid.Grid.SelectRows.

Ah, that's helpful. I searched all the source code and didn't find it. I'e
seen it in grid.py now.

Is it possible for the excellent Wiki pages about the grid to be updated
with this sort of info? I would willingly do it myself but I've read the
rules...

Hugh

Hugh Gibson wrote:

The documentation at http://wiki.wxpython.org/index.cgi/wxGrid talks about using wxGrid::wxGridSelectCells etc (wxGridSelectRows == 1 I presume) which isn't defined anywhere as far as I can see. Surely this should be in grid.py?

It is an attribute of the class. In 2.4 it is wxGrid.wxGridSelectRows and in 2.5 is is wx.grid.Grid.wxGridSelectRows with a slightly easier alias: wx.grid.Grid.SelectRows.

Ah, that's helpful. I searched all the source code and didn't find it. I'e seen it in grid.py now.

Is it possible for the excellent Wiki pages about the grid to be updated with this sort of info? I would willingly do it myself but I've read the rules...

I've been thinking seriously about removing rule 5 so more people will work on keeping the pages up to date. I think that the original worry I added that rule for has never materialized...

···

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

I've been thinking seriously about removing rule 5 so more people will
work on keeping the pages up to date. I think that the original worry
I added that rule for has never materialized...

OK, I might do some pottering when I've finished this round of work with
the grid.

Hugh