Contents Up Previous Next

wxMultiChoiceDialog

This class represents a dialog that shows a list of strings, and allows the user to select one or more.

Derived from

wxDialog
wxWindow
wxEvtHandler
wxObject

Include files

<wx/choicdlg.h>

See also

wxMultiChoiceDialog overview, wxSingleChoiceDialog

Members

wxMultiChoiceDialog::wxMultiChoiceDialog
wxMultiChoiceDialog::GetSelections
wxMultiChoiceDialog::SetSelections
wxMultiChoiceDialog::ShowModal


wxMultiChoiceDialog::wxMultiChoiceDialog

wxMultiChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, int n, const wxString* choices, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition)

wxMultiChoiceDialog(wxWindow* parent, const wxString& message, const wxString& caption, const wxArrayString& choices, long style = wxCHOICEDLG_STYLE, const wxPoint& pos = wxDefaultPosition)

Constructor taking an array of wxString choices.

Parameters

parent

message

caption

n

choices

style

pos

Remarks

Use wxMultiChoiceDialog::ShowModal to show the dialog.

wxPython note: For Python the two parameters n and choices are collapsed into a multi parameter choices which is expected to be a Python list of strings.


wxMultiChoiceDialog::GetSelections

wxArrayInt GetSelection() const

Returns array with indexes of selected items.


wxMultiChoiceDialog::SetSelections

void SetSelections(const wxArrayInt& selections) const

Sets selected items from the array of selected items' indexes.


wxMultiChoiceDialog::ShowModal

int ShowModal()

Shows the dialog, returning either wxID_OK or wxID_CANCEL.