'block' is one or more of the following statements. The "Title"
statement is optional but at least one of the others must be present.
INSTRUCTION | MAX LINES |
Text | 10 |
DropDown | 9 |
Request | 7 |
Title | 1 |
Read across the top for the maximum Text lines.
Read down left for the maximum DropDown lines.
Read intersection for the maximum Request lines.
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | |
0 | 7 | 6 | 6 | 5 | 4 | 3 | 3 | 2 | 1 | 1 | 0 |
1 | 6 | 6 | 5 | 4 | 3 | 3 | 2 | 1 | 0 | ||
2 | 5 | 5 | 4 | 3 | 2 | 2 | 1 | 0 | |||
3 | 5 | 4 | 3 | 2 | 2 | 1 | 0 | ||||
4 | 4 | 3 | 2 | 2 | 1 | 0 | |||||
5 | 3 | 2 | 1 | 1 | 0 | ||||||
6 | 2 | 1 | 0 | ||||||||
7 | 1 | 1 | 0 | ||||||||
8 | 0 | ||||||||||
9 | 0 |
Example:
:dlogtest()
:Prgm
:Local name,readbl
:Dialog
: Title "S A M P L E D I A L O
G"
: Text "Put spaces in title for readibility."
: Text "Use three spaces between words in the
title."
: Text ""
: Request "Enter your name",name
: Text ""
: DropDown "Is the title readable?",{"Yes","No"},readbl
:EndDlog
:If ok=0 Then
: Text "You hit ESC"
: "not given"»name
: "Unknown readibility"»readbl
:ElseIf ok=1 Then
: Text "You hit ENTER"
: If readbl=1 then
: "Title was readable."»readbl
: Else
: "Title was not readable"»readbl
: EndIf
:Else
: Text "This is not possible!"
:EndIf
:Dialog
: Title "Y O U R I N P U T"
: Text "Your name:"
: Text name
: Text ""
: Text readbl
:EndDlog
:EndPrgm
Note:
Not all strings in a Dialog may be empty (0 characters), there must
be at least one character in at least one of the strings.
Example:
:"This is the title."»str
:Dialog
: Title str
: Text ""
:EndDlog
Max length of string STR is 50 characters. The string may be empty.
This statement may not be used alone, it must be used within a Dialog.
Title is not required in a Dialog.
Example:
:"This is a Text line."»str
:Dialog
: Text str
: Text "This is another line."
:EndDlog
Max length of string STR is 38 characters.
The string may be empty.
This statement may be used alone or within a Dialog.
Example:
:2»var
:{"12345","54321"}»list
:Dialog
: DropDown "This is a 30 character string.",list,v
:EndDlog
:Disp "You selected..."
:Disp list[v]
Max length of string STR is 36, 34 minus width of widest element in
LIST, or 0.
STR | LIST |
36 | 0 |
34 | 1 |
33 | 2 |
... | ... |
5 | 30 |
... | ... |
0 | 30 |
Example:
:"Another silly string"»var1
:Dialog
: Request "What is this?",var1
: Request "Enter a number",var2
:EndDlog
:expr(var2)»var2
Max length of string STR is 20 characters.
The string may be empty.
VAR will contain the entered string. If VAR already contains a string,
that string will be displayed in the request box.
If VAR is expected to be a number or expression it must be converted
with expr().
This statement may be used alone or within a Dialog.