.. include:: headings.inc .. _MultiChoiceDialog: ========================================================================================================================================== |phoenix_title| **MultiChoiceDialog** ========================================================================================================================================== This class represents a dialog that shows a list of strings, and allows the user to select one or more. .. _MultiChoiceDialog-styles: |styles| Window Styles ================================ This class supports the following styles: - ``OK``: Show an ``OK`` button. - ``CANCEL``: Show a Cancel button. - ``CENTRE``: Centre the message. Not Windows. .. seealso:: :ref:`MultiChoiceDialog Overview `, `SingleChoiceDialog` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **MultiChoiceDialog** .. raw:: html

Inheritance diagram of MultiChoiceDialog

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~MultiChoiceDialog.__init__` Constructor taking an array of `String` choices. :meth:`~MultiChoiceDialog.GetSelections` Returns array with indexes of selected items. :meth:`~MultiChoiceDialog.SetSelections` Sets selected items from the array of selected items' indexes. :meth:`~MultiChoiceDialog.ShowModal` Shows the dialog, returning either ``ID_OK`` or ``ID_CANCEL``. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~MultiChoiceDialog.Selections` See :meth:`~MultiChoiceDialog.GetSelections` and :meth:`~MultiChoiceDialog.SetSelections` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: MultiChoiceDialog(Dialog) This class represents a dialog that shows a list of strings, and allows the user to select one or more. **Possible constructors**:: MultiChoiceDialog(parent, message, caption, n, choices, style=CHOICEDLG_STYLE, pos=DefaultPosition) MultiChoiceDialog(parent, message, caption, choices, style=CHOICEDLG_STYLE, pos=DefaultPosition) .. method:: __init__(self, *args, **kw) |overload| **Overloaded Implementations**: **~~~** **__init__** `(self, parent, message, caption, n, choices, style=CHOICEDLG_STYLE, pos=DefaultPosition)` Constructor taking an array of `String` choices. :param `parent`: Parent window. :type `parent`: Window :param `message`: Message to show on the dialog. :type `message`: string :param `caption`: The dialog caption. :type `caption`: string :param `n`: The number of choices. :type `n`: int :param `choices`: An array of strings, or a string list, containing the choices. :type `choices`: string :param `style`: A dialog style (bitlist) containing flags chosen from standard dialog styles and the ones listed in the class documentation. The default value is equivalent to ``DEFAULT_DIALOG_STYLE`` | ``RESIZE_BORDER`` | ``OK`` | ``CANCEL`` | ``CENTRE``. :type `style`: long :param `pos`: Dialog position. Not Windows. :type `pos`: Point .. note:: Use :meth:`ShowModal` to show the dialog. **~~~** **__init__** `(self, parent, message, caption, choices, style=CHOICEDLG_STYLE, pos=DefaultPosition)` Constructor taking an array of `String` choices. :param `parent`: Parent window. :type `parent`: Window :param `message`: Message to show on the dialog. :type `message`: string :param `caption`: The dialog caption. :type `caption`: string :param `choices`: An array of strings, or a string list, containing the choices. :type `choices`: list of strings :param `style`: A dialog style (bitlist) containing flags chosen from standard dialog styles and the ones listed in the class documentation. The default value is equivalent to ``DEFAULT_DIALOG_STYLE`` | ``RESIZE_BORDER`` | ``OK`` | ``CANCEL`` | ``CENTRE``. :type `style`: long :param `pos`: Dialog position. Not Windows. :type `pos`: Point .. note:: Use :meth:`ShowModal` to show the dialog. **~~~** .. method:: GetSelections(self) Returns array with indexes of selected items. :rtype: `list of integers` .. method:: SetSelections(self, selections) Sets selected items from the array of selected items' indexes. :param `selections`: :type `selections`: list of integers .. method:: ShowModal(self) Shows the dialog, returning either ``ID_OK`` or ``ID_CANCEL``. :rtype: `int` .. attribute:: Selections See :meth:`~MultiChoiceDialog.GetSelections` and :meth:`~MultiChoiceDialog.SetSelections`