"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 ('&')", "");
:see: `wx.CommandEvent`
", "");
- DocDeclStr(
- wxString , GetLabel(),
- "Return a control's text.", "");
-
- DocDeclStr(
- void , SetLabel(const wxString& label),
- "Sets the item's text.", "");
-
// DocDeclStr(
// bool , GetAdjustMinSizeFlag(),
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+
+ %property(Alignment, GetAlignment, doc="See `GetAlignment`");
+ %property(LabelText, GetLabelText, doc="See `GetLabelText`");
+
};
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`");
};