2.6 Adding Push Buttons
To complete the Customer Inquiry
window, you need to add two push buttons. An OK push button to submit the
customer number and a EXIT push button to end the application.
Follow these steps:
- Choose the Push button
icon
from the Parts Palette
window.
- Point and click on this icon, then
point below the Static text part on the Customer Inquiry window and click
the left mouse button.
- Double-click on this part with the
left mouse button. The Properties notebook appears.
- Change the Part name
field on the General tab to PSBOK and the Label
field to OK.
- Select the Style
page of the notebook. The Style page appears.
- Select the check box for the Default
option. This action specifies that the part is selected if the Enter key
is pressed.
- Click OK to save
and close the notebook.
To place several instances of the same part onto the
canvas, select Options > Part creation > Point and click. Select
the part you wish to use then click on the Sticky option on the Parts
Palette. Move the pointer to the desired area on the canvas and click the left-mouse
button and repeat as necessary. Once you are finished creating the parts, cancel the
selection of the Sticky option on the Parts Palette.
Now let's add the EXIT
push button. We can create a duplicate of the OK push button.
Follow these steps:
- Move the pointer to the OK
push button part and press the right mouse button. The pop-up menu for this part appears.
- Select the Edit
menu choice, and then select the Duplicate submenu choice. A second OK
push button is created.
- Move the pointer to this new Push
button part. Click and hold the left mouse button and move the push
button part below the Entry field part.
- Release the left mouse button.
The Customer Inquiry window
should now look like the following:
Click on
to indicate that you've done all the steps.