selection color for wx.grid.Grid (on linux)

5 views
Skip to first unread message

Demetrios Tsillas

unread,
Apr 19, 2019, 3:35:05 PM4/19/19
to wxPython-dev
I have an app which populates a grid and selects row 0 on startup.

The problem is that the selected row is shown as having a grey background.

Once I select the right (left-mouse) it turns into the correct orange color (rgba(240, 119, 70, 0.902)).

Is there someway I can have the correct color shown even before selecting the row with the mouse?

Also, once I load the grid if I left-click the column label area (above the grid data) before I select a row I get this message on the console:

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

Using 4.0.4, Ubuntu 18.02 and python 2.7. Unfortunately the app is large so coming up with a simple .py to demonstrate the problem is not easy.

Robin Dunn

unread,
Apr 22, 2019, 11:27:54 AM4/22/19
to wxPython-dev

On Friday, April 19, 2019 at 12:35:05 PM UTC-7, Demetrios Tsillas wrote:
I have an app which populates a grid and selects row 0 on startup.

The problem is that the selected row is shown as having a grey background.

Once I select the right (left-mouse) it turns into the correct orange color (rgba(240, 119, 70, 0.902)).

Is there someway I can have the correct color shown even before selecting the row with the mouse?


It sounds like the difference between the grid having the keyboard focus or not. Have you tried calling the grid's SetFocus method? (Perhaps via wx.CallAfter to delay it until the next iteration of the event loop.)

 

Also, once I load the grid if I left-click the column label area (above the grid data) before I select a row I get this message on the console:

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

Using 4.0.4, Ubuntu 18.02 and python 2.7. Unfortunately the app is large so coming up with a simple .py to demonstrate the problem is not easy.

GTK is very nitpicky about warnings and errors, and it seems to change on every release. So it's usually okay to just ignore the messages.

--
Robin
 

Demetrios Tsillas

unread,
Apr 23, 2019, 3:08:07 PM4/23/19
to wxPyth...@googlegroups.com
Is there a way to suppress this warning so it doesn't show up in the console?

--
You received this message because you are subscribed to a topic in the Google Groups "wxPython-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxPython-dev/AtqQwdMbSjY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wxPython-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages