Click Event

Object List Next Object

Defined By:
OptionButton

Description:

Occurs when a button is clicked on.

Usage:

Sub Click ()

Details:

Click events are often used to initiate an action in response to user input. Typically, clicking on a control means a user is selecting it and would like to perform some action. Click events are also useful for maintaining the state of controls in an application with respect to one another. For example, when a particular button is clicked, another control may be enabled or disabled according to the button's value.

The way in which a click event is activated is different for different objects. See the following chart for details:


Object Code or user actions that generate a Click Event


Form Clicking on an empty area or disabled control.

Control (general) Pressing a control's designated mnemonic key combination.

Clicking the left mouse button on the control.

Button Pressing the SPACEBAR when this control has focus.

Setting the Button's Value property to True. Pressing ESC or ENTER if the Cancel or Default properties were set, respectively.

CheckBox Pressing the SPACEBAR when this control has focus.

Changing the CheckBox's Value property.

OptionButton Pressing the SPACEBAR when this control has focus.

Setting the OptionButton's Value property to True.

ComboBox, Pressing the Up or Down arrow keys when this control has focus.

File List Box,

List Box


Note: The click event can also respond to the right mouse button if a user has switched the functions of the left and right mouse buttons by using the mouse settings in the Control Panel.

When a Click event occurs as the result of mouse events, Phoenix sends the MouseDown, MouseUp, and Click events, in that order. Your application can implement behavior that differs according to which mouse button is pressed by testing the
button argument to the MouseDown, MouseMove, and MouseUp events.

See Also:

DbleClick event,, MouseDown, MouseUp events