added clear method; return None for empty boxes

This commit is contained in:
gac-maloja
2023-10-07 20:29:33 +02:00
parent d3f300e7a5
commit 2d5116c935
2 changed files with 12 additions and 0 deletions

View File

@ -25,6 +25,9 @@ class MathEntry(wx.TextCtrl):
def GetValue(self):
val = super().GetValue()
if val == "": #TODO?
return None
if val == "None": #TODO?
return None
@ -90,4 +93,8 @@ class MathEntry(wx.TextCtrl):
self.SetForegroundColour(wx.NullColour)
def clear(self):
super().SetValue("")