Public Member Functions

# wxMultiChoiceDialog Class Reference
[Common Dialogs]

`#include <wx/choicdlg.h>`

Inheritance diagram for wxMultiChoiceDialog:
[legend]

## Detailed Description

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

##

Library: wxBase
Category: Common Dialogs

See also:
  wxMultiChoiceDialog Overview, wxSingleChoiceDialog

## Public Member Functions
wxArrayInt | GetSelection () const
| Returns array with indexes of selected items.
void | SetSelections (const wxArrayInt &selections)
| Sets selected items from the array of selected items' indexes.
int | ShowModal ()
| Shows the dialog, returning either wxID_OK or wxID_CANCEL.
| wxMultiChoiceDialog (wxWindow *parent, const wxString &message, const wxString &caption, int n, const wxString *choices, long style=wxCHOICEDLG_STYLE, const wxPoint &pos=wxDefaultPosition)
| Constructor taking an array of wxString choices.
| 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.

List of all members.

## Constructor & Destructor Documentation

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

Constructor taking an array of wxString choices.

Parameters:

  | parent | Parent window.
  | message | Message to show on the dialog.
  | caption | The dialog caption.
  | n | The number of choices.
  | choices | An array of strings, or a string list, containing the choices.
  | style | A dialog style (bitlist) containing flags chosen from standard dialog style and the ones listed below. The default value is equivalent to wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxOK | wxCANCEL | wxCENTRE.
  | pos | Dialog position. Not Windows.

## Styles

This class supports the following styles:

- wxOK:
  Show an OK button.
- wxCANCEL:
  Show a Cancel button.
- wxCENTRE:
  Centre the message. Not Windows.

Remarks:
  Use 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: Not supported by wxPerl.

wxMultiChoiceDialog::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 | Parent window.
  | message | Message to show on the dialog.
  | caption | The dialog caption.
  | choices | An array of strings, or a string list, containing the choices.
  | style | A dialog style (bitlist) containing flags chosen from standard dialog style and the ones listed below. The default value is equivalent to wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxOK | wxCANCEL | wxCENTRE.
  | pos | Dialog position. Not Windows.

## Styles

This class supports the following styles:

- wxOK:
  Show an OK button.
- wxCANCEL:
  Show a Cancel button.
- wxCENTRE:
  Centre the message. Not Windows.

Remarks:
  Use 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: Use an array reference for the choices parameter.

## Member Function Documentation

wxArrayInt wxMultiChoiceDialog::GetSelection | ( |  | ) | const

Returns array with indexes of selected items.

void wxMultiChoiceDialog::SetSelections | ( | const wxArrayInt & | selections | ) |

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

int wxMultiChoiceDialog::ShowModal | ( |  | ) | `[virtual]`

Shows the dialog, returning either wxID_OK or wxID_CANCEL.

Reimplemented from wxDialog.

|  | [ top ]