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:
@@ -277,6 +277,18 @@ is selected.", "");
|
||||
slightly more natural for controls which support multiple selection.", "");
|
||||
|
||||
|
||||
%pythoncode {
|
||||
def GetItems(self):
|
||||
"""Return a list of the strings in the control"""
|
||||
return [self.GetString(i) for i in xrange(self.GetCount())]
|
||||
|
||||
def SetItems(self, items):
|
||||
"""Clear and set the strings in the control from a list"""
|
||||
self.Clear()
|
||||
for i in items:
|
||||
self.Append(i)
|
||||
}
|
||||
%property(Items, GetItems, SetItems);
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user