Wiki Markup |
---|
{alias:qgetdouble}
h2. Name
|
Name
*qgetdouble
...
—
...
input
...
dialog
...
for
...
decimal
...
numbers
...
Syntax
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
qgetdouble caption label initialvalue |
Description
The qgetdouble command displays a dialog for double precision numberical input. The dialog contains an entry field, OK and Cancel buttons. Extra arguments provide the dialog with a caption, a descriptive label, and an initial value.
The command returns either the number entered by the user or, when Cancel is pushed, an empty string "".
The dialog is modal, meaning script execution is halted until the user closes the dialog.
Arguments
label
initial value
Examples
Ex.1: Numerical input dialog
Anchor | ||||
---|---|---|---|---|
|
No Format | ||||
---|---|---|---|---|
| ||||
# Ask user for a number, suggesting 100 as initial value
set d [qgetdouble "Get Double" "Please Enter number" 100]
{noformat}
!att:_img_cmd^qgetdouble.png!
In the example script shown above an input dialog is displayed asking the user for a number. The chosen number will be assigned to the variable 'd', or, if the user pressed *Cancel*, an empty string.
{pagebreak} |
In the example script shown above an input dialog is displayed asking the user for a number. The chosen number will be assigned to the variable 'd', or, if the user pressed Cancel, an empty string.