UI_GET_TEXT()
Syntax
Result_String as C = UI_GET_TEXT( Title as C, Caption_Text as C [, Default_String as C [, Format_String as C ]] )
Argument | Description | |
Title | The title of the dialog box. | |
Caption_Text | The descriptive text next to the text field. | |
Default_String | Optional. Default = "". A default value to display in the text field. | |
Format_String | Optional. Default = "" (all characters). Forces the entered text to follow a specific format. The format string is a sequence of special characters that dictates how you are to enter a valid text string. | |
Format Character | Description | |
L | Any upper letter | |
l | Any letter | |
# | Any digit, sign, or decimal | |
N | Any upper letter, digit, sign or decimal | |
n | Any letter, digit, sign or decimal | |
A | Any upper letter or digit | |
a | Any letter or digit | |
0 | Any digit | |
& | Any character | |
Description:
UI_GET_TEXT() creates and displays a dialog box containing a text field. The text that you enter or change is returned as a Result_String. This function is useful for obtaining a text string that conforms to a specified format. [Picture]
The Result_String will be empty ("") if the Cancel button is selected.
Supported By
Alpha Five Version 5 and Above
Limitations
Desktop applications only.
Example
The dialog box presents a default choice of "Green" then prompts the user for a favorite color.
dim color as C color = "" color = ui_get_text("Favorite color","Enter your favorite color ", "Green", "&&&&&&&&&&&") ? color = "Purple" |
This example implements a "find by key" function using UI_GET_TEXT().
dim key as C key = ui_get_text("Find", "Find what") if (key <> "") then topparent.find(key) end if |
See Also