]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/samples/frogedit/StatusBar.py
Updated PyCrust contrib from Patrick O'Brian.
[wxWidgets.git] / wxPython / samples / frogedit / StatusBar.py
diff --git a/wxPython/samples/frogedit/StatusBar.py b/wxPython/samples/frogedit/StatusBar.py
new file mode 100644 (file)
index 0000000..d8c45d4
--- /dev/null
@@ -0,0 +1,22 @@
+from wxPython.wx import *
+
+import os.path
+
+class CustomStatusBar(wxStatusBar):
+    def __init__(self, parent):
+        wxStatusBar.__init__(self, parent, -1)
+        self.SetFieldsCount(3)
+
+    def setFileName(self, fn):
+        path, fileName = os.path.split(fn)
+        self.SetStatusText(fileName, 0)
+
+    def setRowCol(self, row, col):
+        self.SetStatusText("%d,%d" % (row,col), 1)
+
+    def setDirty(self, dirty):
+        if dirty:
+            self.SetStatusText("...", 2)
+        else:
+            self.SetStatusText(" ", 2)
+