[ wxwindows-Bugs-1645080 ] Overflow error in CustomTreeCtrl

SourceForge.net noreply at sourceforge.net
Fri Jan 26 00:42:34 PST 2007


Bugs item #1645080, was opened at 2007-01-26 09:42
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1645080&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: wxPython specific
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Frank Niessink (fniessink)
Assigned to: Robin Dunn (robind)
Summary: Overflow error in CustomTreeCtrl

Initial Comment:
Hi Andrea and others,

One of my (Task Coach) users reported the following traceback:
Traceback (most recent call last):
  File "taskcoach.pyw", line 4, in <module>
  File "taskcoach.pyo", line 79, in start
  File "taskcoach.pyo", line 31, in __init__
  File "taskcoach.pyo", line 60, in init
  File "gui\mainwindow.pyo", line 55, in __init__
  File "gui\mainwindow.pyo", line 67, in createWindowComponents
  File "gui\mainwindow.pyo", line 104, in createFilterSideBar
  File "gui\filter.pyo", line 128, in __init__
  File "gui\filter.pyo", line 146, in createInterior
  File "widgets\treectrl.pyo", line 461, in __init__
  File "widgets\treectrl.pyo", line 427, in __init__
  File "widgets\itemctrl.pyo", line 45, in __init__
  File "widgets\itemctrl.pyo", line 91, in __init__
  File "wx\lib\customtreectrl.pyo", line 1794, in __init__
  File "wx\_gdi.pyo", line 114, in __init__
OverflowError: in method 'new_Colour', expected argument 3 of type 'byte'

Line 1794 is the __init__ of CustomTreeCtrl. The relevant lines are these, the last line is 1794:

btnshadow = wx.SystemSettings_GetColour(wx.SYS_COLOUR_BTNSHADOW)
self._hilightUnfocusedBrush = wx.Brush(btnshadow)
r, g, b = btnshadow.Red(), btnshadow.Green(), btnshadow.Blue()
backcolour = ((r >> 1) - 20, (g >> 1) - 20, (b >> 1) - 20)
backcolour = wx.Colour(backcolour[0], backcolour[1], backcolour[2])
 
Apparently the (b>>1) -20 gets too big for the button shows colour on my user's platform (Windows, don't know what version, let me know if it matters).

Cheers, Frank


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1645080&group_id=9863




More information about the wx-dev mailing list