LeftClick
LeftClick() Event
Called when the user left clicks on a cell
Applies to: Grid
LeftClick() Event
Left click
Applies to: Tree
Introduced in KCML version 5.02
This event is called if the user left clicks on a suitable control to select it. In the case of a grid the LeftAction property should be set appropriately.
It might be followed by a LeftDblClk() event.
There is also a Click() event for a left click on a dropdown (or ellipsis) button. Trees and graphs also have a NoItemClick() method for clicks outside the tree or graph.
On grids this event handler is commonly used to activate grid cell editing by calling either the EditCell(), EditGrid(), or EditRow() methods, for example:
- DEFEVENT Form1.GridControl1.LeftClick() ..EditGrid(..CursorRow, ..CursorCol) END EVENT
On trees this event handler is called if the user left clicks on a node or a leaf within the tree and the Index property is available within this event handler to determine which item the user selected. For example, the following could be used to return the text associated with the item that the user selected:
SelItem$ = ..Item(..Index).Text$
If there are both LeftClick() and SelChange() event handlers for a KCML edit, grid or tree, then only the LeftClick() and not the SelChange() event will be generated when clicking on an item.