New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IntCtrl value cannot be set to None even with allow_none=True #790

ExplodingCabbage opened this Issue Mar 16, 2018 · 0 comments


None yet
1 participant

ExplodingCabbage commented Mar 16, 2018

Operating system: Any
wxPython version: 4.0.1
Python version: Any

Description of the problem:

This should not raise, but does:

>>> import wx
>>> from wx.lib.intctrl import IntCtrl
>>> app = wx.App()
>>> frame = wx.Frame(None, size=(640, 480))
>>> IntCtrl(frame, allow_none=True, value=None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/wx/lib/", line 498, in __init__
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/wx/lib/", line 542, in SetValue
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/wx/lib/", line 807, in _colorValue
    if not self.IsInBounds(value):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/wx/lib/", line 726, in IsInBounds
    return min <= value <= max
TypeError: '<=' not supported between instances of 'NoneType' and 'NoneType'

RobinD42 added a commit that referenced this issue Mar 22, 2018

RobinD42 added a commit that referenced this issue Mar 22, 2018

HelioGuilherme66 added a commit to HelioGuilherme66/Phoenix that referenced this issue Jun 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment