X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1b8c7ba607a15a2ff8a04448138df9ffff7df6c5..0a5bb138a71dfc1c706fc0858fb2801500e2c2e8:/wxPython/src/_statusbar.i diff --git a/wxPython/src/_statusbar.i b/wxPython/src/_statusbar.i index 6988a190a5..8cc9caab24 100644 --- a/wxPython/src/_statusbar.i +++ b/wxPython/src/_statusbar.i @@ -98,6 +98,25 @@ 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(BorderX, GetBorderX, doc="See `GetBorderX`"); + %property(BorderY, GetBorderY, doc="See `GetBorderY`"); + %property(FieldRect, GetFieldRect, doc="See `GetFieldRect`"); + %property(Fields, GetFields, SetFields, doc="See `GetFields` and `SetFields`"); + %property(FieldsCount, GetFieldsCount, SetFieldsCount, doc="See `GetFieldsCount` and `SetFieldsCount`"); + %property(StatusText, GetStatusText, SetStatusText, doc="See `GetStatusText` and `SetStatusText`"); };