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

Robin Dunn <[email protected]> Mon, 22 Apr 2019 08:27:54 -0700 (PDT)
Newsgroups gmane.comp.python.wxpython.devel
Message-ID <[email protected]>
------=_Part_778_14652830.1555946874825
Content-Type: multipart/alternative; 
	boundary="----=_Part_779_177495152.1555946874825"

------=_Part_779_177495152.1555946874825
Content-Type: text/plain; charset="UTF-8"


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
 

-- 
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

------=_Part_779_177495152.1555946874825
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br>On Friday, April 19, 2019 at 12:35:05 PM UTC-7, Demetr=
ios Tsillas wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;marg=
in-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"=
ltr">I have an app which populates a grid and selects row 0 on startup.<div=
><br></div><div>The problem is that the selected row is shown as having a g=
rey background.</div><div><br></div><div>Once I select the right (left-mous=
e) it turns into the correct orange color (rgba(240, 119, 70, 0.902)).</div=
><div><br></div><div>Is there someway I can have the correct color shown ev=
en before selecting the row with the mouse?</div></div></blockquote><div><b=
r></div><div><br></div><div>It sounds like the difference between the grid =
having the keyboard focus or not. Have you tried calling the grid&#39;s Set=
Focus method? (Perhaps via wx.CallAfter to delay it until the next iteratio=
n of the event loop.)</div><div><br></div><div>=C2=A0</div><blockquote clas=
s=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #c=
cc solid;padding-left: 1ex;"><div dir=3D"ltr"><div><br></div><div>Also, onc=
e I load the grid if I left-click the column label area (above the grid dat=
a) before I select a row I get this message on the console:</div><div><br><=
/div><div><div>*** BUG ***</div><div>In pixman_region32_init_rect: Invalid =
rectangle passed</div><div>Set a breakpoint on &#39;_pixman_log_error&#39; =
to debug</div></div><div><br></div><div>Using 4.0.4, Ubuntu 18.02 and pytho=
n 2.7. Unfortunately the app is large so coming up with a simple .py to dem=
onstrate the problem is not easy.</div></div></blockquote><div><br></div><d=
iv>GTK is very nitpicky about warnings and errors, and it seems to change o=
n every release. So it&#39;s usually okay to just ignore the messages.</div=
><div><br></div><div>--</div><div>Robin</div><div>=C2=A0</div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;wxPython-dev&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">wxPyth=
[email protected]</a>.<br />
For more options, visit <a href=3D"https://groups.google.com/d/optout">http=
s://groups.google.com/d/optout</a>.<br />

------=_Part_779_177495152.1555946874825--

------=_Part_778_14652830.1555946874825--