From f2aad0d78c647353f23ff393aa1218207b0a0c0e Mon Sep 17 00:00:00 2001 From: cncfanatics Date: Tue, 9 Nov 2010 23:00:07 +0100 Subject: [PATCH] Add a status bar and a clear call --- gui/graphFrame.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gui/graphFrame.py b/gui/graphFrame.py index f7cc53d93..1db588904 100644 --- a/gui/graphFrame.py +++ b/gui/graphFrame.py @@ -35,6 +35,7 @@ from gui import bitmapLoader class GraphFrame(wx.Frame): def __init__(self, parent, style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE): wx.Frame.__init__(self, parent, style=style) + self.CreateStatusBar() self.mainSizer = wx.BoxSizer(wx.VERTICAL) self.SetSizer(self.mainSizer) @@ -119,14 +120,18 @@ class GraphFrame(wx.Frame): success, status = view.getPoints(values) if not success: #TODO: Add a pwetty statys bar to report errors with + self.SetStatusText("Invalid values") return x, y = success, status + self.subplot.clear() self.subplot.plot(x, y) self.canvas.draw() + self.SetStatusText("") + def onFieldChanged(self, event): try: self.draw() except: - pass + self.SetStatusText("Invalid values")