Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Group: GUI functions
See also: readvalue

Function: selectitem
Description: opens a self defined menu box to ask for a choice. The choice may have to be confirmed or not (mode="single").

Usage: i = selectitem(headline, items {, mode})
Input:
headline a string
items a vector of strings
mode a string (only one option is "single")
Output:
i a number of selected item, 1 ... rows of items

Example:
headline = "Please select"
items = "linear" | "quadratic" | "log"
i = selectitem(headline, items)
i

Result:
A menu box opens where you read headline and are able to select one or more of the topics listed in items.

By selecting OK a vector i is created containing a 1 at the position of a selected item and a 0 otherwise.
Example:
item = "choose data" | " plot data"
head = "XploRe"
task = selectitem(head,item,"single")

Result:
A menu box opens where you are able to select one or more of the topics listed in items. You do NOT have to press  to confirm the selection.



(C) MD*TECH Method and Data Technologies, 05.02.2006