Table Of Contents

Previous topic

MoveEvent

Next topic

NameFlags

This Page

phoenix_title MultiChoiceDialog

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

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.

See also

MultiChoiceDialog Overview, SingleChoiceDialog


class_hierarchy Inheritance Diagram

Inheritance diagram for class MultiChoiceDialog

Inheritance diagram of MultiChoiceDialog


method_summary Methods Summary

__init__ Constructor taking an array of String choices.
GetSelections Returns array with indexes of selected items.
SetSelections Sets selected items from the array of selected items’ indexes.
ShowModal Shows the dialog, returning either ID_OK or ID_CANCEL.

property_summary Properties Summary

Selections See GetSelections and 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)

Methods



__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.

Parameters:
  • parent (Window) – Parent window.
  • message (string) – Message to show on the dialog.
  • caption (string) – The dialog caption.
  • n (int) – The number of choices.
  • choices (string) – An array of strings, or a string list, containing the choices.
  • style (long) – 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.
  • pos (Point) – Dialog position. Not Windows.

Note

Use ShowModal to show the dialog.



__init__ (self, parent, message, caption, choices, style=CHOICEDLG_STYLE, pos=DefaultPosition)

Constructor taking an array of String choices.

Parameters:
  • parent (Window) – Parent window.
  • message (string) – Message to show on the dialog.
  • caption (string) – The dialog caption.
  • choices (list of strings) – An array of strings, or a string list, containing the choices.
  • style (long) – 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.
  • pos (Point) – Dialog position. Not Windows.

Note

Use ShowModal to show the dialog.





GetSelections(self)

Returns array with indexes of selected items.

Return type:list of integers


SetSelections(self, selections)

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

Parameters:selections (list of integers) –


ShowModal(self)

Shows the dialog, returning either ID_OK or ID_CANCEL.

Return type:int

Properties



Selections

See GetSelections and SetSelections