GetTextColour returns negative value under linux...
Laurent Dufrechou
laurent.dufrechou at gmail.com
Mon Dec 17 14:53:39 PST 2007
Hello,
I'm 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.)
Here is my code:
cur_style = wx.TextAttr()
self.text_ctrl.GetStyle(self.text_ctrl.GetInsertionPoint(),cur_style)
current_text_color = cur_style.GetTextColour()
current_back_color = cur_style.GetBackgroundColour()
default_text_color = wx.NamedColor(self.default_text_color)
default_back_color = wx.NamedColor(self.background_color)
print >>sys.__stdout__,current_text_color,'vs',default_text_color
print >>sys.__stdout__,current_back_color,'vs',default_back_color
Do you know where is my error?
Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20071217/76d6f138/attachment.htm
More information about the wxpython-users
mailing list