]> git.saurik.com Git - wxWidgets.git/commitdiff
Added a Python-specific Append method to the wxListCtrl
authorRobin Dunn <robin@alldunn.com>
Thu, 7 Mar 2002 20:31:15 +0000 (20:31 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 7 Mar 2002 20:31:15 +0000 (20:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/controls2.i

index 5f0077a7bfa6166eb12f1ab41af006b05f8792bf..c870ad432097ba65069aa283c9117bfe5ac88077 100644 (file)
@@ -701,6 +701,16 @@ public:
 
     def ClearColumnImage(self, col):
         self.SetColumnImage(col, -1)
+
+    def Append(self, entry):
+        '''Append an item to the list control.  The entry parameter should be a
+           sequence with an item for each column'''
+        if len(entry):
+            pos = self.GetItemCount()
+            self.InsertStringItem(pos, str(entry[0]))
+            for i in range(1, len(entry)):
+                self.SetStringItem(pos, i, str(entry[i]))
+            return pos
     "
 };