display a Maplet application that prompts the user to make a selection - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Maplets : Examples : Maplets/Examples/Selection

Maplets[Examples][Selection] - display a Maplet application that prompts the user to make a selection

Calling Sequence

Selection(L, opts)

Parameters

L

-

list of objects

opts

-

equation(s) of the form option=value where option is one of caption, default, title, or unique; specify options for the Maplet application

Description

• 

The Selection(L) calling sequence displays a Maplet application that prompts the user to select one or more items from a list.  It returns an expression sequence that corresponds to the selected items.

  

If no selection is made and OK is pressed, then an error results. If Cancel is pressed, then NULL is returned.

• 

Any elements of L that are of type string are displayed as strings. Other elements are displayed by using the MathMLViewer element.

• 

The Selection sample Maplet worksheet describes how to write a Maplet application that behaves similarly to this routine by using the Maplets[Elements] package.

• 

The opts argument can contain one or more of the following equations that set Maplet application options.

  

 

  

caption = string

  

Specifies the line that prompts the user to make a selection. By default, the caption is Make a selection:.

  

 

  

default = posint or list(posint)

  

Specifies item(s) initially selected. By default, none of the items of L is selected. However, if the option unique is set to true, by default, the first item in L is selected. Only one item can be specified if the option unique is set to true.

  

 

  

title = string

  

Specifies the Maplet application title.  By default, the title is Selection.

  

 

  

unique = true or false

  

If this option is set to true, the user can select only one of the items.

Examples

withMaplets[Examples]:

Selectiona,b,c,d

3,4

(1)

See Also

Maplets[Elements], Maplets[Elements][MathMLViewer], Maplets[Examples], Overview of Maplet Applications, Selection Sample Maplet, string


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam