(self, parent, value, id=wx.ID_ANY, style=0, **kwargs)
| 110 | class FloatRangeBox(wx.TextCtrl): |
| 111 | |
| 112 | def __init__(self, parent, value, id=wx.ID_ANY, style=0, **kwargs): |
| 113 | # Workaround for #2591 |
| 114 | if 'wxMac' in wx.PlatformInfo and 'size' not in kwargs: |
| 115 | kwargs['size'] = wx.Size(97, 26) |
| 116 | super().__init__(parent=parent, id=id, style=style, **kwargs) |
| 117 | self.Bind(wx.EVT_TEXT, self.OnText) |
| 118 | self._storedValue = '' |
| 119 | value = [v for v in value if v is not None] |
| 120 | if not value: |
| 121 | self.ChangeValue('') |
| 122 | else: |
| 123 | self.ChangeValue('{}-{}'.format(valToStr(min(value)), valToStr(max(value)))) |
| 124 | |
| 125 | def ChangeValue(self, value): |
| 126 | self._storedValue = value |
nothing calls this directly
no test coverage detected