X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9f8a9f548973be3033383aa235edadcf858336e8..3af4da323ab401ad41e2eca2c6afbc2c3d632da6:/wxPython/src/_statusbar.i diff --git a/wxPython/src/_statusbar.i b/wxPython/src/_statusbar.i index 14fa24cb93..f5ddb06411 100644 --- a/wxPython/src/_statusbar.i +++ b/wxPython/src/_statusbar.i @@ -43,7 +43,7 @@ public: wxStatusBar(wxWindow* parent, wxWindowID id = -1, long style = wxDEFAULT_STATUSBAR_STYLE, const wxString& name = wxPyStatusLineNameStr); - %name(PreStatusBar)wxStatusBar(); + %RenameCtor(PreStatusBar, wxStatusBar()); // Turn it back on again %typemap(out) wxStatusBar* { $result = wxPyMake_wxObject($1, $owner); } @@ -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); };