click

click();                             (Form)

click(control: control-type input);  (Control)

click(menuItem: MenuItem input);     (MenuItem)

The click event occurs when the user presses and then releases the left mouse button over an object.

For a menu item, this event occurs when the user clicks the menu item. If the menu item has a submenu, logic in this event allows the contents of the submenu to be changed before it becomes visible.

For a form, this event occurs when the user clicks a blank area or a disabled control. (The click event is lost if a form or another application is displayed between the mouseDown or keyDown event and the mouseUp or keyUp event. This occurs most commonly if write instructions invoke the display window or if the display window has bring to top enabled.)

For a control, this event occurs when the user:

For the JadeTextEdit class, a single click event positions the caret (insertion point) in the text editor, a double-click selects a word, a triple-click selects a line, and a single-click outside selected text cancels the selection.

For details about handling the click event method in check box, combo box, list box, and option button controls and user-defined subclasses of only those controls on Web pages, see "Handling Events on Web Pages", in the JADE Web Application Guide.

Typically, you attach a click event to a control or menu, to carry out commands and command-like actions, or to a change in the control.

You can use the value property of a control to test for the state of the control from logic (except for a push button control). When a click event is generated, JADE also calls the related events in the following order.

  1. mouseDown

  2. mouseUp

  3. click

When you attach methods for these related events, ensure that their actions do not conflict.

To distinguish between the left, right, and middle mouse buttons, use the mouseDown and mouseUp events.

The methods in the following examples show the use of the click event method.

btnCancel_click(btn: Button input) updating;
begin
    unloadForm;
end;

theTable_dblClick(table: Table input) updating;
begin
    if xColSave <> 0 and yRowSave <> 0 then
        if theTable.row > 1 then
            btnChange.click(btnChange);
        endif;
    endif;
end;