How Do I ... : Work with complex parts : Add forms : Prompt for text input
Prompt for text input
Prompt for path and file namesPrompt for path and file namesNo tip for this topicExample: Prompt for a new nameExample: Prompt for a new nameUse view wrappersUse view wrappers
At times, you need to prompt users for a string of text.
Adding a text prompter  
To display a window into which users enter a text string, add a Text Prompter part:
1. Go to a Composition Editor open on a visual part in your application.
2. Select Prompter category icon (Prompter category) and Text Prompter icon (Text Prompter part).
3. Click on the free-form surface.
Changing the settings for the prompter  
Define what the prompter displays by changing its settings:
1. Open the Text Prompter part's Properties window.
2. Specify the title of the window, the messageString with the text you want to appear above the field where users type in text, and the defaultAnswerString with any default text.
Connecting the prompter to other parts  
After you define a prompter, make an event-to-action connection so the prompter displays when the event occurs. Connect the event, such as clicked for a push button, to the prompt action of the Text Prompter part.
Also, make an attribute-to-attribute connection that passes the text entered as a parameter.
For more information on scripts and connections, see Connect scripts and parts to add function.
Last modified date: 08/14/2019