AskMsgChoice

Revision as of 23:33, 17 August 2011 by Lchrisman (talk | contribs) (combo box parameter)


new to Analytica 4.4

AskMsgChoice(question,title,optionsList,default,showAll,anyTextOk)

When evaluated, a pop-up dialog asks the user to select from a drop-down of possible choices.

Parameters:

  • «question» : Text that appears in the dialog body itself, above the choice pulldown.
  • «title» : The caption for the dialog.
  • «optionsList»: An unindex list, or a 1-D array, containing the possible options. It can be an expression that computes such a list. Numbers are coerced to text using the number format for the variable currently being evaluated.
  • «default» (optional): The item from the choice list that should be selected initially. Defaults to "All" when «showAll» is true, or to the first item otherwise. Unless «allowAnyText» is true, an error is issued when the value does not exist in «optionsList».
  • «showAll» : (optional boolean, default: false): Indicates whether the "All" option should appear on the dropdown.
  • «anyTextOk» : (optional boolean, default:false): When this is true, a ComboBox is displayed. The «optionsList» is a dropdown with suggested values, but any value may be typed. When true, «default» does not have to be in the «optionsList».

The result returned is the selected label from «optionsList», unless "All" is selected, in which case the result is the same value supplied as «optionsList».

The dialog includes an OK and a Cancel button. When Cancel is pressed, the current in-process computation is aborted.

When called from ADE, this function does not present any UI, and simply returns the default selection.

Examples

AskMsgChoice("What is your favorite color?", "Select color", ['Black','Blue','Brown','Cyan','Green','Orange','Red','White','Yellow'], 'Green')

See Also

Comments


You are not allowed to post comments.