Example: Prompt for a new name
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
Adding the Text Prompter part
Next, add the text prompter:
1. Select
(Prompter category) and
(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