X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f847dc245299ce879d676308e7aee0c4d61d9ab..97ab0f6ab4898d6ee1e2cad716643cabe40e3268:/wxPython/src/_control.i diff --git a/wxPython/src/_control.i b/wxPython/src/_control.i index 8e53cee9db..d755d75270 100644 --- a/wxPython/src/_control.i +++ b/wxPython/src/_control.i @@ -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,23 @@ 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(Count, GetCount, doc="See `GetCount`"); + %property(Items, GetItems, SetItems, doc="See `GetItems` and `SetItems`"); + %property(Selection, GetSelection, SetSelection, doc="See `GetSelection` and `SetSelection`"); + %property(StringSelection, GetStringSelection, SetStringSelection, doc="See `GetStringSelection` and `SetStringSelection`"); + %property(Strings, GetStrings, doc="See `GetStrings`"); };