"Example: Add a form and actions" shows how to make a reusable form that has the actions setName: and setAddress:. This example shows how to use the form to display a given name and address.
Adding a form to your application
Begin by adding the form to a window:
Adding the rest of the parts
Next, add the following parts:
Changing the parts' settings
Now, change the parts' settings so your work in the Composition Editor
resembles the following:
For the group box settings, set the hoverHelpEnabled property to true. This adds hover help for the push buttons.
For one of the push buttons, change its name to Name. Also, change its label to Name or, in the push button's settings, specify a graphic for the label. The icon of a man shown above is in the ABTICO50 module at ID 543. To specify the icon:
For the other push button, change its name to Address and change its label. The icon of the world shown above is in the ABTICO50 module at ID 283. (For UNIX, it's I0000283.ico in abtico50.)
For one of the text prompters, specify in its settings: Name for the title and Type a name: for the message.
Similarly, for the other text prompter, specify Address for the title and Type the person's address: for the message.
Connecting to the form's public interface
Now connect the form's setName: and setAddress: actions to the parts that you've made:
After you make the connections, the Composition Editor resembles the
following:
When you run the application, notice how the hover help displays the names you gave for the push buttons.