OnClick Event

Occurs when the mouse button is pressed and released upon the object.

Syntax

Object.OnClick()

The OnClick event syntax has the following parts:

 

Name

Type

Description

Object

An object

A control or the AForm object

Comments

OnClick occurs when the mouse button is clicked once.

For some objects, this event is fired when the value of the object is changed. For a list of which objects, see the "See Also" links below. In addition the AButton control may receive the OnClick event when ENTER or ESC is pressed depending on the Default and the Cancel property.

Example

chk1.OnClick()

{

chk1.Caption="Hello"

}

Applies to

 

AButton

AGroupBox

ASider

AChart

AImage

ASwitch

ACheckBox

ALabel

ATextBox

AComboBox

AListBox

 

AForm

ARadioButton

 

See Also

ACheckBox.OnChange, AComboBox.OnChange, ALabel.OnChange, ARadioButton.OnChange, AScrollBar.OnChange, ASlider.OnThumbValueChanged, ASwitchBox.OnChange, ATextBox.OnChange, Cancel, Default, OnDblClick, OnMouseDown, OnMouseMove, OnMouseUp