wxGrid - some question

Hi,

Few question ,

how to change cursor's (the black box on the current cell) colour or style ?

how to switch off this cursor

I would like to make the “cursor” select the whole row instead of only the cell like in wxListCtrl (I know SelectRow()) .

Best regars

Artur

Artur Kapela wrote:

Hi,
Few question ,
    how to change cursor's (the black box on the current cell) colour or style ?

  SetCellHighlightColour(colour)
  SetCellHighlightPenWidth(width)

    how to switch off this cursor

  SetCellHighlightPenWidth(0)

I would like to make the "cursor" select the whole row instead of only the cell like in wxListCtrl (I know SelectRow()) .

This needs a combination of things, and has been discussed here before. IIRC, first you need to pass Grid.SelectRows for the selection mode parameter of CreateGrid or SetTable. Then if you want to have just a single row selected you need to catch the selected events and unselect rows other than the current one.

···

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

Thanks a lot Robin.

···

----- Original Message ----- From: "Robin Dunn" <robin@alldunn.com>
To: <wxPython-users@lists.wxwidgets.org>
Sent: Monday, July 03, 2006 7:02 PM
Subject: Re: [wxPython-users] wxGrid - some question

Artur Kapela wrote:

Hi,
Few question ,
    how to change cursor's (the black box on the current cell) colour or style ?

SetCellHighlightColour(colour)
SetCellHighlightPenWidth(width)

    how to switch off this cursor

SetCellHighlightPenWidth(0)

I would like to make the "cursor" select the whole row instead of only the cell like in wxListCtrl (I know SelectRow()) .

This needs a combination of things, and has been discussed here before. IIRC, first you need to pass Grid.SelectRows for the selection mode parameter of CreateGrid or SetTable. Then if you want to have just a single row selected you need to catch the selected events and unselect rows other than the current one.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

All of this is built-into the Dabo grid. Just set the SelectionMode
property to "Row", and it handles the selecting/unselecting for you.
You can also set the SelectionMode to "Col" or "Cell" at any time, and
the behavior switches automatically. It saves me a ton of coding!

···

On 7/3/06, Robin Dunn <robin@alldunn.com> wrote:

> I would like to make the "cursor" select the whole row instead of
> only the cell like in wxListCtrl (I know SelectRow()) .

This needs a combination of things, and has been discussed here before.
  IIRC, first you need to pass Grid.SelectRows for the selection mode
parameter of CreateGrid or SetTable. Then if you want to have just a
single row selected you need to catch the selected events and unselect
rows other than the current one.

--

# p.d.