]> 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 85d8175ffd55f24af83122f1f66dfaf2c98cea3a..10b7b43f45ec73a79d5a464177361387f1f07b54 100644 (file)
@@ -67,6 +67,22 @@ __init__ as a plain old wx.Control is not very useful.", "");
         "Do the 2nd phase and create the GUI control.", "");
     
 
+    DocDeclStr(
+        int , GetAlignment() const,
+        "Get the control alignment (left/right/centre, top/bottom/centre)", "");
+    
+
+//     DocDeclStr(
+//         static wxString , GetLabelText(const wxString& label),
+//         "Get the string without mnemonic characters ('&')", "");
+    
+
+    DocDeclStr(
+        wxString , GetLabelText() const,
+        "Get just the text of the label, without mnemonic characters ('&')", "");
+    
+
+    
     DocDeclStr(
         void , Command(wxCommandEvent& event),
         "Simulates the effect of the user issuing a command to the item.
@@ -99,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`");
+
 };
 
 
@@ -256,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);
     
 };