MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / __init__

Method __init__

gui/utils/inputs.py:112–123  ·  view source on GitHub ↗
(self, parent, value, id=wx.ID_ANY, style=0, **kwargs)

Source from the content-addressed store, hash-verified

110class 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

Callers

nothing calls this directly

Calls 3

ChangeValueMethod · 0.95
valToStrFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected