Gridlib's grid cursor suddenly requires focus to display

I just upgraded from wxPython 2.8.7.1 to 2.8.10.1, and as a result, gridlib's grid cursor will only display if the grid has focus.

This =ruins= a major application of mine. It is absolutely essential that I be able to display the grid cursor whether or not the grid has focus. (Grid cell selection logic is irrelevant.)

Please tell me there's a simple fix for this! Besides going back to 2.8.7.1, I mean!

Bob

Not that I know of. You can probably do something using custom cell renderers to highlight the current cell in some other way.

···

On 1/5/10 8:36 PM, Bob Klahn wrote:

I just upgraded from wxPython 2.8.7.1 to 2.8.10.1, and as a result,
gridlib's grid cursor will only display if the grid has focus.

This =ruins= a major application of mine. It is absolutely essential
that I be able to display the grid cursor whether or not the grid has
focus. (Grid cell selection logic is irrelevant.)

Please tell me there's a simple fix for this! Besides going back to
2.8.7.1, I mean!

--
Robin Dunn
Software Craftsman

Why did this change, Robin? It's been working fine for ages. What happened? I need to be able to undo whatever change was made between wxPython 2.8.7.1 and 2.8.10.1 that has caused the grid cursor to disappear when focus is lost.

Please do whatever you can to pin this down.

Bob

···

At 02:09 PM 1/6/2010, you wrote:

On 1/5/10 8:36 PM, Bob Klahn wrote:

I just upgraded from wxPython 2.8.7.1 to 2.8.10.1, and as a result,
gridlib's grid cursor will only display if the grid has focus.

This =ruins= a major application of mine. It is absolutely essential
that I be able to display the grid cursor whether or not the grid has
focus. (Grid cell selection logic is irrelevant.)

Please tell me there's a simple fix for this! Besides going back to
2.8.7.1, I mean!

Not that I know of. You can probably do something using custom cell renderers to highlight the current cell in some other way.
--
Robin Dunn
Software Craftsman
http://wxPython.org

Here is the changeset:

http://trac.wxwidgets.org/changeset/51314/wxWidgets/branches/WX_2_8_BRANCH/src/generic/grid.cpp

The standard convention across all platforms and most types of widgets is to remove focus indicators or carets when a widget doesn't have the focus, and it makes sense that the current cell highlight would follow the same pattern. This change was simply done to bring the Grid into compliance with common expectations.

···

On 1/6/10 11:56 AM, Bob Klahn wrote:

At 02:09 PM 1/6/2010, you wrote:

On 1/5/10 8:36 PM, Bob Klahn wrote:

I just upgraded from wxPython 2.8.7.1 to 2.8.10.1, and as a result,
gridlib's grid cursor will only display if the grid has focus.

This =ruins= a major application of mine. It is absolutely essential
that I be able to display the grid cursor whether or not the grid has
focus. (Grid cell selection logic is irrelevant.)

Please tell me there's a simple fix for this! Besides going back to
2.8.7.1, I mean!

Not that I know of. You can probably do something using custom cell
renderers to highlight the current cell in some other way.
--
Robin Dunn
Software Craftsman
http://wxPython.org

Why did this change, Robin? It's been working fine for ages. What
happened? I need to be able to undo whatever change was made between
wxPython 2.8.7.1 and 2.8.10.1 that has caused the grid cursor to
disappear when focus is lost.

Please do whatever you can to pin this down.

--
Robin Dunn
Software Craftsman

I hear you. I wish I'd understood back during initial design that grid cursors were intended to be focus-dependent. Live and learn.

Anyway, it's clear now that I need to bite the bullet and recode with custom cell renderers, as you suggested. Sigh.

Thanks for cluing me in.

Bob

···

At 03:08 PM 1/6/2010, Robin Dunn wrote:

On 1/6/10 11:56 AM, Bob Klahn wrote:

At 02:09 PM 1/6/2010, you wrote:

On 1/5/10 8:36 PM, Bob Klahn wrote:

I just upgraded from wxPython 2.8.7.1 to 2.8.10.1, and as a result,
gridlib's grid cursor will only display if the grid has focus.

This =ruins= a major application of mine. It is absolutely essential
that I be able to display the grid cursor whether or not the grid has
focus. (Grid cell selection logic is irrelevant.)

Please tell me there's a simple fix for this! Besides going back to
2.8.7.1, I mean!

Not that I know of. You can probably do something using custom cell
renderers to highlight the current cell in some other way.
--
Robin Dunn
Software Craftsman
http://wxPython.org

Why did this change, Robin? It's been working fine for ages. What
happened? I need to be able to undo whatever change was made between
wxPython 2.8.7.1 and 2.8.10.1 that has caused the grid cursor to
disappear when focus is lost.

Please do whatever you can to pin this down.

Here is the changeset:

wxTrac has been migrated to GitHub Issues - wxWidgets

The standard convention across all platforms and most types of widgets is to remove focus indicators or carets when a widget doesn't have the focus, and it makes sense that the current cell highlight would follow the same pattern. This change was simply done to bring the Grid into compliance with common expectations.

--
Robin Dunn
Software Craftsman
http://wxPython.org

I hear you. I wish I'd understood back during initial design that grid cursors were intended to be focus-dependent. Live and learn.

Anyway, it's clear now that I need to bite the bullet and recode with custom cell renderers, as you suggested. Sigh.

Thanks for cluing me in.

Bob

···

At 03:08 PM 1/6/2010, Robin Dunn wrote:

On 1/6/10 11:56 AM, Bob Klahn wrote:

At 02:09 PM 1/6/2010, you wrote:

On 1/5/10 8:36 PM, Bob Klahn wrote:

I just upgraded from wxPython 2.8.7.1 to 2.8.10.1, and as a result,
gridlib's grid cursor will only display if the grid has focus.

This =ruins= a major application of mine. It is absolutely essential
that I be able to display the grid cursor whether or not the grid has
focus. (Grid cell selection logic is irrelevant.)

Please tell me there's a simple fix for this! Besides going back to
2.8.7.1, I mean!

Not that I know of. You can probably do something using custom cell
renderers to highlight the current cell in some other way.
--
Robin Dunn
Software Craftsman
http://wxPython.org

Why did this change, Robin? It's been working fine for ages. What
happened? I need to be able to undo whatever change was made between
wxPython 2.8.7.1 and 2.8.10.1 that has caused the grid cursor to
disappear when focus is lost.

Please do whatever you can to pin this down.

Here is the changeset:

wxTrac has been migrated to GitHub Issues - wxWidgets

The standard convention across all platforms and most types of widgets is to remove focus indicators or carets when a widget doesn't have the focus, and it makes sense that the current cell highlight would follow the same pattern. This change was simply done to bring the Grid into compliance with common expectations.

--
Robin Dunn
Software Craftsman
http://wxPython.org

Bob Klahn wrote:

Anyway, it's clear now that I need to bite the bullet and recode with custom cell renderers, as you suggested. Sigh.

If this is daunting, you could try dropping in Dabo's dGrid instead, which exposes properties like:

column.BackColor = (128,255,0)
column.DynamicBackColor = funcThatReturnsColor

But dGrid will only be appropriate if you are using your grids to display cohesive data, like records in a database.

http://dabodev.com

Paul