Generic Function | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## set-focus-cell

Arguments: grid-widget row-section column-section row column &optional (row-number 0) (column-number 0)

Changes which cell in grid-widget has the keyboard focus when the grid-widget itself has the keyboard focus. The focus is indicated by a rectangle that's drawn around the cell, unless the grid-widget's show-focus property has been turned off. grid-widget should be an instance of the `grid-widget` control/class.

An application can call this function to change the focus cell programmatically. Methods can also be added to catch whenever the focus cell changes, because this generic function is always called internally to change the focus cell when the user does so interactively, typically by pressing the arrow keys or clicking a cell. The built-in methods should not be overridden. An `:around` method avoids calling other methods if the specified cell is already the current focus cell.

The four remaining required and two optional arguments should be specified as follows:

- row-section: the `grid-row-section` instance that contains the new focus-cell, and should be one of the row sections that are returned if row-sections is called on grid-widget. Row sections may alternately be found by calling functions such as row-section or next-section.
- column-section: the `grid-column-section` instance that contains the new focus-cell, and should be one of the column sections that are returned if column-sections is called on grid-widget. Column sections may alternately be found by calling functions such as column-section or next-section.
- row: the `grid-row` instance that contains the new focus-cell, and should be one of the rows that are returned if subsections is called on row-section. Rows may alternately be found by calling functions such as subsection or next-subsection.
- column: the `grid-column` instance that contains the new focus-cell, and should be one of the columns that are returned if subsections is called on column-section. Columns may alternately be found by calling functions such as subsection or next-subsection.
- row-number: the index of the particular replication of row that contains the new focus-cell, when row is a replicated grid-row (one whose section-count property is greater than one). The default is zero, indicating the first replication of the row.
- column-number: the index of the particular replication of column that contains the new focus-cell, when column is a replicated grid-column (one whose section-count property is greater than one). The default is zero, indicating the first replication of the column.

To find the cell that currently has the focus within a `grid-widget`, call focus-cell.

See the description of the `grid-widget` control/class.

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.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version