added clear method; return None for empty boxes
This commit is contained in:
@ -37,4 +37,9 @@ class ListEntry(wx.BoxSizer):
|
|||||||
return [e.Enable() for e in self.entries]
|
return [e.Enable() for e in self.entries]
|
||||||
|
|
||||||
|
|
||||||
|
def clear(self):
|
||||||
|
for e in self.entries:
|
||||||
|
e.clear()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,6 +25,9 @@ class MathEntry(wx.TextCtrl):
|
|||||||
def GetValue(self):
|
def GetValue(self):
|
||||||
val = super().GetValue()
|
val = super().GetValue()
|
||||||
|
|
||||||
|
if val == "": #TODO?
|
||||||
|
return None
|
||||||
|
|
||||||
if val == "None": #TODO?
|
if val == "None": #TODO?
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@ -90,4 +93,8 @@ class MathEntry(wx.TextCtrl):
|
|||||||
self.SetForegroundColour(wx.NullColour)
|
self.SetForegroundColour(wx.NullColour)
|
||||||
|
|
||||||
|
|
||||||
|
def clear(self):
|
||||||
|
super().SetValue("")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user