X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6aaca5bac6f3ad13add44c220163fda423c40351..8383c116984a708d402b4ec47cfa849f7e690e6a:/wxPython/src/_control.i diff --git a/wxPython/src/_control.i b/wxPython/src/_control.i index adf3b06174..10b7b43f45 100644 --- a/wxPython/src/_control.i +++ b/wxPython/src/_control.i @@ -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); };