OnClick (Method)

Applies To:

ControlsCheckBox object, ControlsCommandButton object, ControlsDropDown, ControlsOptionsButton, ControlsTextBox, EventScript object, Shape object

Description:

Simulates a user click event. This method exhibits the same behavior as simply clicking on a control. Any scripts associated with an OnClick event are triggered.

The OnClick handler supports the optional bqoEvent parameter, which provides access to the mouse cursor position relative to the Dashboard control. The bqoEvent parameter contains two properties: ClickX and ClickY. When the event occurs, the event handler has access to the event related information needed to process it. For example, the event might require the position of the mouse cursor for a picture OnClick event, or information about which table column was clicked for a table embedded section object OnClick event.

Syntax:

Expression.OnClick([optional] BQEvent as bqoEvent)

Expression Required:

An expression that returns an object for any of the following:

Example:

This example shows how to invoke a command button event handler:

MyDashboard = ActiveDocument.Sections["Dashboard"]
MyDashboard.Controls["CommandButton1"].OnClick()