Yeah you are true robin,
GetStyle returns False under linux and True under Windows...
So why Get Style doesn't work under linux? Is there any special things I
need to do to have it work under linux?
Or perhaps another method call will just work??
Regards,
Laurent
-----Message d'origine-----
Envoyé : mardi 18 décembre 2007 06:08
linux...
Laurent Dufrechou wrote:
Hello,
Im playing with a wx.TextCtrl.
I use the code below to try to compare the color of the char under
current cursor position with default color.Under windows it works without any issue.
Under linux the cuurent_xxxx value returns negative values whatever the
color is! (-1,-1,-1,255) the bad thing moreover is that is not possible
(looking to wx doc value should be positive )
That's how methods returning a wx.Colour indicate an error condition or
an invalid colour. If you call the IsOk() method of the color object it
will return False.
Here is my code:
cur_style = wx.TextAttr()
self.text_ctrl.GetStyle(self.text_ctrl.GetInsertionPoint(),cur_style)
You can also check the return value of GetStyle to see if it succeeds or
not.
···
De : Robin Dunn [mailto:robin@alldunn.com]
À : wxPython-users@lists.wxwidgets.org
Objet : Re: [wxPython-users] GetTextColour returns negative value under
--
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