JADE is an advanced software platform that has an integrated software development environment, a language, an object manager, and a high performance database.

Code the Click Event for a Button

       

Event Methods

Control respond to Windows events. For example, a Windows click event for a button occurs when the user clicks it.

As a developer, you decide what is to happen for any of these Windows events. These responses are coded in the appropriate event method for the control.

You will code the click event method for the buttonCancel on the AddBookForm. What is to happen is that the form is removed from the screen and from memory. Here is where inheritance comes in: the Form superclass has a method, called unloadForm, that does exactly what you want.

Instructions

  1. In the Class Browser, select the AddBookForm.
  2. In the properties window, select buttonCancel.
  3. In the methods window, select click. A method skeleton for the buttonCancel_click method is displayed.
  4. On the empty line between begin and end; enter
    self.unloadForm();
  5. Select the Methods | Compile Method menu command.
  6. Run your application and test the click method works.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 Contents
 

For maximum reliability, security and performance of your JADE solution, JADE Care24 is our fully comprehensive systems management offering.