Fires when the user clicks on the control.

Parameters

ParameterDescription
ItemThe item clicked
PointThe mouse cursor location
ButtonThe mouse button used to click
ShiftIndicates whether or not the SHIFT key is down
ControlIndicates whether or not the CTRL key is down

Remarks

The OnClick event fires when the user clicks anywhere on the control. The Item parameter indiciates which item was clicked. If the user did indeed click on an item, then this parameter is set to that item's key. If this parameter is "", then user clicked on an empty portion of the control.

The remaining parameters identify the state of various objects when the click occured. The Point parameter identifies the location of the mouse cursor relative to the control's upper left hand corner. The Button parameter names the mouse button used to execute the click and will be "Left", "Middle", or "Right". The Shift and Control parameters indicate whether or not the SHIFT or CTRL keys respectively where pressed during the click. Is such cases, they will be set to 1.

Example

Transfer Param1 to Item 
Transfer Param2 to Point 
Transfer Param3 to Button 
Transfer Param4 to Shift 
Transfer Param5 to Ctrl 

// Did the user click an item? 
ItemClicked = (Item NE "")

See Also

OnDblClick

  • No labels