Selbox
Selbox
displays a popup windows with a list of choices (one choice per line). The user clicks on one of the lines to select his choice.
This function is only usable in Classic pages related code and is deprecated for code running in version 7 mode.
Syntax
Selbox CHOICE_LIST Using ANSWER
Selbox CHOICE_LIST Titled TITLE Using ANSWER
CHOICE_LIST
is a list of string expressions and/or string variables separated by commas. The content of each string is displayed on a different line. The variables can be arrays and a sub-array can be given with the syntaxMYARRAY(INDEX1..INDEX2)
where ÌNDEX1and ÌNDEX2
are integer expressions giving the index range where the choices should be taken from.TITLE
is a string expression that contains the title of the popup that appears.ANSWER
is an variable that returns the line number selected (1 for the first choice, 2 for the second...).
Examples
# Let's decide what to do
Local Integer MOOD,GOOD_REASONS,REASON
Local Char REASONS(1..20)
GOOD_REASONS=func FILL_REASONS(REASONS)
Selbox "Awful", "Bad", "Average", "Good", "Outstanding"
& Titled "How do you feel today?" Using MOOD
If MOOD<2
Call BAD_MOOD
Else
Selbox "I don't know", REASONS(1..GOOD_REASONS)
& Titled "Why are you OK ?" Using REASON
Endif
Endif
Description
Selbox
opens a popup with a list of choices. This instruction should be used only to display a box with a finite (small) list of choices.
See also
Endbox, Errbox, Infbox, Qstbox, Wrnbox