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:

  1. Choose the Push button icon from the Parts Palette window.
  2. Point and click on this icon, then point below the Static text part on the Customer Inquiry window and click the left mouse button.
  3. Double-click on this part with the left mouse button. The Properties notebook appears.
  4. Change the Part name field on the General tab to PSBOK and the Label field to OK.
  5. Select the Style page of the notebook. The Style page appears.
  6. Select the check box for the Default option. This action specifies that the part is selected if the Enter key is pressed.
  7. Click OK to save and close the notebook.
  8. 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:

  1. Move the pointer to the OK push button part and press the right mouse button. The pop-up menu for this part appears.
  2. Select the Edit menu choice, and then select the Duplicate submenu choice. A second OK push button is created.
  3. 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.
  4. Release the left mouse button.
  5. The Customer Inquiry window should now look like the following:

Click on to indicate that you've done all the steps.