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 and optional client data.

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.

wxPerl note: In wxPerl there is just an array reference in place of n.


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.