Example: Prompt for a new name
Prompt for text inputPrompt for text inputNo tip for this topicNo example for this topicUse view wrappersUse view wrappers
This example shows how to make a simple application that prompts users for a new name for a window. The application uses a Text Prompter part and push buttons.
Adding the using interface  
Begin by creating an application, adding a visual part to it, and opening a Composition Editor on the visual part. Next, add two Push Button parts to the Window part shown in the Composition Editor. Buttons category icon (Buttons category).
After you add the push buttons, change their labels and arrange them so the user interface looks like the following:
Window with push buttons
Adding the Text Prompter part  
Next, add the text prompter:
1. Select Prompter category icon (Prompter category) and Text Prompter icon (Text Prompter part).
2. 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 following text in the appropriate fields:
title
Name the Window
messageString
Type in a new title for the window:
defaultAnswerString
This Window
Connecting the prompter to other parts  
Make the following connections:
Connect the clicked event of the Rename push button to the prompt action of the Text Prompter part.
Connect the normalResult attribute of the clicked-prompt connection to the title attribute of the Window part.
Connect the clicked event of the Cancel push button to the closeWidget action of the Window part.
Finally, test the application. When you select Rename, the text prompter opens.
Last modified date: 08/14/2019