Some properties for things with lists of items.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user