selectMode
Type: Integer
Availability: Read or write at any time
The selectMode property of the Table class enables you to control the selections that are made automatically when the user clicks a cell of the table using the mouse or the keyboard.
Your logic can set the selected property value of any cell, regardless of the value contained in the selectMode property.
When you set the selected property of a fixed cell from JADE logic, the values of all non-fixed cells in that row or column are also set to that value.
The settings of the selectMode property, listed in the following table, have meaning when a cell is clicked with the mouse or keyboard (if the Shift or Ctrl key is not also pressed). The selection status of all cells is first cleared.
Table Class Constant | Value | Description |
---|---|---|
SelectMode_Default | 0 | The default value, which specifies that the cell selection is turned on for a non-fixed cell and for a fixed row, all non-fixed cells in the whole row are selected. For a cell in a fixed column, all non-fixed cells in that column are selected. |
SelectMode_FixedRow | 1 | Same as SelectMode_Default except that selecting a cell in a fixed row has no effect. |
SelectMode_FixedColumn | 2 | Same as SelectMode_Default except that selecting a cell in a fixed column has no effect. |
SelectMode_Multiple | 3 | Multiple cells can be selected in any row or column. Clicking on a fixed cell has no impact on selection. |
SelectMode_Row | 4 | Multiple cells can be selected only in the same row. Clicking on a fixed cell has no impact on selection. |
SelectMode_Column | 5 | Multiple cells can be selected only in the same column. Clicking on a fixed cell has no impact on selection. |
SelectMode_Single | 6 | Only one cell can be selected at a time. Clicking on a fixed cell has no impact on selection. |
SelectMode_None | 7 | Clicking anywhere on the table has no impact on selection. |
SelectMode_CurrentRow | 8 | When the selectMode property is set to SelectMode_CurrentRow, the current row of the sheet of the table is always considered to be selected. This results in all the cells of the row being shown as selected. |
The selected status of any cell not in the current row is always false and the selected status of any cell in the current row is always true. A user cannot affect this status by logic or by a mouse or keyboard action. The only change occurs when a new row is selected by logic or by a user action, where the selection rules then apply to the new current row. | ||
Note that any logic attempting to change the selection status of any cell, row, column, or sheet is ignored. | ||
SelectMode_WholeRows | 9 | When the selectMode property is set to SelectMode_WholeRows, the selected status of all cells in a row is affected when the user clicks on any cell in the row, the selected property of any cell is changed, or the user uses a keyboard arrow key to change rows. |
This selection style allows multiple rows to be selected at once, by using the keyboard, the mouse (using the Shift or Ctrl key), or logic. | ||
SelectMode_CurrentColumn | 10 | When the selectMode property is set to SelectMode_CurrentColumn, the current column of the sheet of the table is always considered to be selected. This results in all the cells of the column being shown as selected. |
The selected status of any cell not in the current column is always false and the selected status of any cell in the current column is always true. A user cannot affect this status by logic or by a mouse or keyboard action. The only change occurs when a new column is selected by logic or by a user action, where the selection rules then apply to the new current column. Note that any logic attempting to change the selection status of any cell, row, column, or sheet is ignored. | ||
SelectMode_WholeColumns | 11 | When the selectMode property is set to SelectMode_WholeColumns, the selected status of all cells in a column is affected when the user clicks on any cell in the column, the selected property of any cell is changed, or the user uses a keyboard arrow key to change columns. This selection style allows multiple columns to be selected at once, by using the keyboard, the mouse (using the Shift or Ctrl key), or logic. |
Clicking a cell with the Ctrl key down toggles the selection of that cell. (See also the selected property.)
Clicking a cell with the Shift key down causes the selection of all cells from the currently selected cell up to the cell that is being clicked when they are in the same row or column. (If they are not in the same row or column, only the cell that is clicked is selected.)
The code fragment in the following example shows the use of the selectMode property.
table1.selectMode := comboSelectMode.listIndex - 1;