How to Insert a Close Button

Previous Next

See Also

To add a close button to a window or dialog, you insert the button, and then add an action to it. You will then have to put the button in the desired location (e.g. at the bottom-right).

To insert a close button:

1. Use the Windows Designer catalog to open the window/dialog to which you want to add a close button.
2. Make sure you are at the highest-level:
· Info Window object is selected if you opened a window.
· Dialog Box object is selected if you opened a dialog.
3. From the menu bar, choose Insert, Button, or drag and drop a button from the Control tab page of the Windows Designer catalog.
4. Select the button. Open the Property Inspector and then click the Behavior tab page.
5. Click the Action property, and then:
· Type "WindowClose()" if the class you selected is a window.
· Type "ActionDialogCancel()" if the class you selected is a dialog.
6. Check whether the object into which you inserted the button has a horizontal orientation.
7. Select the button and from the menu bar, choose Format, Alignment, and then choose Right or Bottom.