INPUTBOX$: Difference between revisions
Jump to navigation
Jump to search
Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link
(Initial version) |
m (Add _COLORCHOOSERDIALOG) |
||
Line 35: | Line 35: | ||
* [[_MESSAGEBOX (function)]] | * [[_MESSAGEBOX (function)]] | ||
* [[_SELECTFOLDERDIALOG$]] | * [[_SELECTFOLDERDIALOG$]] | ||
* [[_COLORCHOOSERDIALOG]] | |||
* [[_OPENFILEDIALOG$]] | * [[_OPENFILEDIALOG$]] | ||
* [[_SAVEFILEDIALOG$]] | * [[_SAVEFILEDIALOG$]] |
Revision as of 20:30, 29 October 2022
The _INPUTBOX$ function displays a prompt in a dialog box, waits for the user to input text or click a button, and returns a string containing the contents of the text box. The returned string is an empty string ("") if the user cancelled.
Syntax
- result$ = _INPUTBOX$(title$, message$[, defaultInput$])
Parameters
- title$ is the dialog box title
- message$ is the message or prompt that will is displayed in the dialog box
- defaultInput$ is a string that is displayed in the text box as the default response if no other input is provided
Description
- All parameters accept an empty string ("") in which case system defaults are used
- Use message$ to specify instructions to the user
- The dialog box automatically becomes a modal window if the application window is visible
Availability
- QB64-PE v3.4 and up
Examples
- Example
- Hello, world with common dialogs
username$ = _INPUTBOX$("Hello App", "Enter your name:", "anonymous") IF username$ <> "" THEN _MESSAGEBOX "Hello App", "Hello " + username$, "info" |
See also
- _NOTIFYPOPUP
- _MESSAGEBOX
- _MESSAGEBOX (function)
- _SELECTFOLDERDIALOG$
- _COLORCHOOSERDIALOG
- _OPENFILEDIALOG$
- _SAVEFILEDIALOG$