]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_control.i
Comment why we don't call PyErr_Print after calling OnInit
[wxWidgets.git] / wxPython / src / _control.i
index adf3b06174c6784b89063918ae879521e2f89eb4..10b7b43f45ec73a79d5a464177361387f1f07b54 100644 (file)
@@ -72,9 +72,9 @@ __init__ as a plain old wx.Control is not very useful.", "");
         "Get the control alignment (left/right/centre, top/bottom/centre)", "");
     
 
-    DocDeclStr(
-        static wxString , GetLabelText(const wxString& label),
-        "Get the string without mnemonic characters ('&')", "");
+//     DocDeclStr(
+//         static wxString , GetLabelText(const wxString& label),
+//         "Get the string without mnemonic characters ('&')", "");
     
 
     DocDeclStr(
@@ -115,6 +115,11 @@ __init__ as a plain old wx.Control is not very useful.", "");
     
     static wxVisualAttributes
     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+
+    %property(Alignment, GetAlignment, doc="See `GetAlignment`");
+    %property(Label, GetLabel, doc="See `GetLabel`");
+    %property(LabelText, GetLabelText, doc="See `GetLabelText`");
+
 };
 
 
@@ -272,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);
     
 };