Using the skills and knowledge you learned in Exercise 3 let's add code to the push buttons for the Parts Inquiry screen. We won't show you all the steps precisely because you are already familiar with them from Exercise 3. In fact if you need to, you can follow the same steps in Exercise 3 add the logic so that actions will be performed on the Parts Inquiry window when the push buttons are pressed. Let's get started.
Follow these steps:
- Add an action subroutine for the EXIT push button. The code you add should support an Exit operation. Remember to save your code.
- Add another action subroutine for the OK push button. Use PARTNO for Factor1 instead of CUSTNO. Change the color of the entry field when it is selected. Use red for the selected entry field and gray for the entry field if it is already selected and therefore is already red. Remember to save your code.
- Build the application. Correct any compile time errors and re-compile as necessary.
- Run the application when it builds successfully.
-
Test the push buttons to ensure that the logic performs correctly.
Your Parts Inquiry window should look like the following when you run your application and click OK.
.