]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_control.i
Some properties for things with lists of items.
[wxWidgets.git] / wxPython / src / _control.i
index 9ecfec7c4f5d8e383b228434a7b18c2238e91d47..10b7b43f45ec73a79d5a464177361387f1f07b54 100644 (file)
@@ -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);
     
 };