]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_statusbar.i
Some properties for things with lists of items.
[wxWidgets.git] / wxPython / src / _statusbar.i
index 6988a190a5191f10f9124bb7e8e9b10be4cfaec0..f5ddb0641112931abcbfeaf3f2b7093e0892eeae 100644 (file)
@@ -98,6 +98,19 @@ public:
 
     static wxVisualAttributes
     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+
+    %pythoncode {
+        def GetFields(self):
+            """Return a list of field values in the status bar. """
+            return [self.GetStatusText(i) for i in range(self.GetFieldsCount())]
+            
+        def SetFields(self, items):
+            """Set the values of the statusbar fields from a list of strings. """
+            self.SetFieldsCount(len(items))
+            for i in range(len(items)):
+                self.SetStatusText(items[i], i)
+    }
+    %property(Fields, GetFields, SetFields);
 };