InputBox: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Brendon (talk | contribs)
No edit summary
Brendon (talk | contribs)
No edit summary
Line 1: Line 1:
INPUTBOX(''prompt''[, ''title''[, ''default'']])
InputBox(''prompt''[, ''title''[, ''default'']])


'''Description'''
== Description ==


INPUTBOX opens a dialog box to prompt a user to input text or click a button. A string is returned containing the contents of the text field from the dialog box. The required parameter, ''prompt'', is a string expression that is displayed in the body of the dialog box. The optional parameter, ''title'', is ignored: it is only for backwards compatibility. The optional parameter, ''default'', is a string expression that is displayed in the text field of the dialog box.  
InputBox opens a dialog box to prompt a user to input text or click a button. A string is returned containing the contents of the text field from the dialog box. The required parameter, ''prompt'', is a string expression that is displayed in the body of the dialog box. The optional parameter, ''title'', is ignored: it is only for backwards compatibility. The optional parameter, ''default'', is a string expression that is displayed in the text field of the dialog box.  


If the user taps OK or presses the Enter key, INPUTBOX returns the text in the input field or an empty string ("") if the input field is empty; if the user taps Cancel or presses the escape key (Esc), INPUTBOX returns “null”.
If the user taps OK or presses the Enter key, InputBox returns the text in the input field or an empty string ("") if the input field is empty; if the user taps Cancel or presses the escape key (Esc), INPUTBOX returns “null”.


'''Example'''
== Example ==


<pre>
<pre>
DIM Return
Dim Return
Return = INPUTBOX("Message area", "", "Default text")
Return = InputBox("Message area", "", "Default text")
PRINT "You entered:", Return
Print "You entered:", Return
</pre>
</pre>


'''Output'''
== Output ==


[[file:InputBox.jpg]]
[[file:InputBox.jpg]]
Line 23: Line 23:
</pre>
</pre>


'''Related Items'''
== Related Items ==


[[nsb.inputbox|NSB.INPUTBOX]]
[[nsb.inputbox|NSB.INPUTBOX]]
[[Category:Language Reference]]

Revision as of 01:37, 17 August 2012

InputBox(prompt[, title[, default]])

Description

InputBox opens a dialog box to prompt a user to input text or click a button. A string is returned containing the contents of the text field from the dialog box. The required parameter, prompt, is a string expression that is displayed in the body of the dialog box. The optional parameter, title, is ignored: it is only for backwards compatibility. The optional parameter, default, is a string expression that is displayed in the text field of the dialog box.

If the user taps OK or presses the Enter key, InputBox returns the text in the input field or an empty string ("") if the input field is empty; if the user taps Cancel or presses the escape key (Esc), INPUTBOX returns “null”.

Example

Dim Return
Return = InputBox("Message area", "", "Default text")
Print "You entered:", Return

Output

You entered:  Default Text

Related Items

NSB.INPUTBOX