WxGetSelectedChoices

From WxWiki
Jump to navigation Jump to search


Pops up a dialog box containing a message, OK/Cancel buttons and a multiple-selection listbox.

The user may choose an arbitrary (including 0) number of items in the listbox whose indices will be returned in selections array. The initial contents of this array will be used to select the items when the dialog is shown. If the user cancels the dialog, the function returns -1 and selections array is left unchanged.

You may pass the list of strings to choose from either using choices which is an array of n strings for the listbox or by using a single aChoices parameter of type wxArrayString.

If centre is true, the message text (which may include new line characters) is centred; if false, the message is left-justified.

wxPerl Note: Use an array reference for the choices parameter. In wxPerl there is no selections parameter; the function returns an array containing the user selections.