OnClick Property

Gets or sets the name of the macro or script to be run when the Click event is triggered.

object.OnClick = [string]

Where object is an object expression that evaluates to one of the controls in the Applies To list, and string is a string expression specifying the script or macro to run when the Click event is triggered.

Client support

   Newlook Smartclient

   Newlook Server

Use

Use this property to run a macro or script when a user presses and releases a mouse button over the control.

Form object

The Form's Click event occurs when a user clicks anywhere on the form. If a control is also clicked, it occurs after the control's Click event is triggered.

CheckBox, OptionButton, ProgressBar, ScrollBar and TrackBar controls

Use this property to run a macro/script to respond to a change in the control. The Click event is triggered after the control's Value property has changed, that is after the Change event.

CommandButton, DataGrid, Label, MenuButton, Panel, PictureBox and TextBox controls

Use this property to run a macro/script when the user left-clicks the control.

ComboBox, DateCombo and NumericCombo controls

Use this property to run a macro/script when the user clicks the text entry portion of the control. Note the Click event will not be triggered when the user clicks the control's drop down arrow, to assign logic to this event, you will need to use the OnDropDown property.

SmartNav Group and Tab Page objects

Use this property to run a macro/script when the user clicks the body of the control. If you want to determine whether the user has clicked a tab or navigation button in either control use the OnSelChanged or OnSelChaging properties - these properties give you more control over the timing of actions specified in the macro/script.

Note:

If the CancelEvent action is used in an OnClick macro/script for the control, then no Click event will be triggered for the form.

See Also

OnDblClick property | OnDownClick property | OnMouseEnter property | OnMouseExit property | OnUpClick property | CancelEvent method

Applies To

Check box control

Combo box control

Command button control

DataGrid control

Date combo box control

Form object

Label control

ListView control

Menu button control

NumericCombo control

Option button control

Panel control

PictureBox control

ProgressBar control

ScrollBar control (control deprecated in version 10.5)

SmartNav Group

Tab control

Tab Page

Text box control

TrackBar control

TreeView control


© 2004-2021 looksoftware. All rights reserved.