Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Unrevised from 8.2 to 9.0.
8.2 version

cell-click

Arguments: grid-widget buttons column-section column-section-border-p column column-num column-border-p x row-section row-section-border-p row row-num row-border-p y &optional trigger-key

This generic function is called when a cell in a grid-widget is clicked. cell-click methods allow the user to initiate arbitrary actions by clicking in particular cells. Often the action is to prompt the user in some way for a new value for the clicked cell; a cell-click method may then call write-cell-value to write the new value into the application's domain data.

If a particular grid cell is to respond to mouse clicks, and the click is not handled by one of the built-in grid-column types such as combo-box-column-mixin, then the application must supply a cell-click method for cells of that row and column type.

grid-widget, row-section, column-section, row, and column are the grid, grid sections, and grid subsections that contain the grid cell that was clicked. row-number and column-number are non-negative integers that indicate the sub-row or sub-column that was clicked when the subsection is replicated (due to having a section-count property that is greater than one); zero indicates the first subsection, and these numbers are always zero for non-replicated subsections.

x and y are the clicked position within the cell, where zero, zero indicates the upper left corner of the cell (inside the borders). The various ...-border-p arguments are true if the click was within *grid-border-mouse-slack* of the right or bottom border of the particular section or subsection.

If trigger-key is true, this indicates that an actual mouse click was not done, but rather that a special key was pressed to emulate a mouse click with the keyboard. In particular, cell-click is called when the user presses the ENTER key or the SPACE bar (unless the user is in a special mode such as typing into an editable-text-column-mixin cell). trigger-key is then the integer code of the key that was pressed, and is therefore the value of either vk-return or vk-space.

A cell-click method could respond differently to each of these keys; for example, a combo-box-column-mixin cell will drop its choice list when SPACE is pressed, as if the user clicked on the cell's arrow, but will start a text edit when ENTER is pressed (assuming that the column's typable property is on), as if the user clicked in the text area of the cell.


Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Unrevised from 8.2 to 9.0.
8.2 version