- Overview
- Initial status of Table control
- Details of display options
- Selection mode
- Display options of columns
- Scrollbars in a Table control
- Options kept for backward compatibility with the earlier versions
- Forcing the title to be single-line
- 5.5-compatible input mode
Characteristics of Table controls in a window
The Table control is used to display and/or type information. This information can come from a data source, from a WLanguage variable, or it can be stored. This help page presents the main characteristics that can be defined for a Table control found in a window: You also have the ability to define the data source displayed in the control. See Content of Table control for more details. Versions 20 and later New in version 20 Initial status of Table control The initial status of a Table control can be: This initial status is defined when creating the control and it can be modified at any time in the "UI" tab of the characteristics of Table control. The different possibilities are as follows: - Visible: The Table control will be visible or not. This option can be modified by programming with ..Visible.
- Editable: The user will be able to perform an input in the control columns if these columns are in edit.
The Table control is not available in edit. It is available in read-only. - Selection (without edit): The user will not be able to perform an input in the control columns. A control row can be selected:
- by clicking this row.
- by using TableSelectPlus.
The row will be selected via the selection bar. Remark: The value of Table control corresponds to the selected row. The code for row selection is run for each selection.
- No edit, no selection: The user will not be able to perform an input in the control columns. A control row can only be selected by programming with TableSelectPlus. This row will be selected via the selection bar. The user will not be able to modify the position of the selection bar.
Remark: The value of Table control corresponds to the selected row. Tip: This option is recommended when a row must be highlighted via the selection bar. - Grayed: The Table control and its columns will be grayed. The user will not be able to enter information in the control.
Details of display options Versions 16 and laterSelection mode The selection modes define how the different elements of Table control (row, column, cell) can be selected by the user or by programming. This selection mode is defined when creating the control. It can be modified at any time in the "UI" tab of the characteristics of Table control. The available selection modes are as follows: - No selection: No selection bar will be displayed, however the selected row, column or cell will have focus (it will be bordered by dots). A row, a column or a cell can be selected by a click on this element or by programming.
- Single selection: The selected row, column or cell will be displayed underneath the selection bar. A row, a column or a cell can be selected by a click on this element or by programming.
- Multi-selection: Several rows, columns or cells of the Table control can be selected at the same time:
- with the Shift key if the rows, columns or cells are consecutive or with the Ctrl key if the elements are not consecutive.
- by programming.
In this case, the number of selection bars will be equal to the number of selected elements.
Remarks: - A WLanguage error will occur if you try to perform a multiple selection by programming while the selection mode is set to "Simple selection".
- During a multiple selection by cell, to select a row, all the cells found in the row must be selected. To simplify this operation, you have the ability to display a row picker ("Style" tab, "Row picker" element, "Picker" option corresponding to "Left arrow").
The selected elements will be retrieved: - with TableSelect. The tsRow, tsColumn, tsCellLine and tsCellColumn constants are used to respectively retrieve information about the rows, the columns and the cells.
- with TableSelectCount. The tsRow, tsColumn, tsCellLine and tsCellColumn constants are used to respectively retrieve the number of rows, columns and cells.
Example: The following example is used to retrieve detailed statistics for the selected cells in the Table control.
// Retrieve the number of selected cells NbSelected is int NbSelected = TableSelectCount(TABLE_DetailedStats, tsCell) // Browse the selected cells FOR i = 1 _TO_ NbSelected // Retrieve the row and the column nRow = TableSelect(TABLE_DetailedStats, i, tsCellLine) nColumn = TableSelect(TABLE_DetailedStats, i, tsCellColumn) // Process ... END
New in version 16Selection mode The selection modes define how the different elements of Table control (row, column, cell) can be selected by the user or by programming. This selection mode is defined when creating the control. It can be modified at any time in the "UI" tab of the characteristics of Table control. The available selection modes are as follows: - No selection: No selection bar will be displayed, however the selected row, column or cell will have focus (it will be bordered by dots). A row, a column or a cell can be selected by a click on this element or by programming.
- Single selection: The selected row, column or cell will be displayed underneath the selection bar. A row, a column or a cell can be selected by a click on this element or by programming.
- Multi-selection: Several rows, columns or cells of the Table control can be selected at the same time:
- with the Shift key if the rows, columns or cells are consecutive or with the Ctrl key if the elements are not consecutive.
- by programming.
In this case, the number of selection bars will be equal to the number of selected elements.
Remarks: - A WLanguage error will occur if you try to perform a multiple selection by programming while the selection mode is set to "Simple selection".
- During a multiple selection by cell, to select a row, all the cells found in the row must be selected. To simplify this operation, you have the ability to display a row picker ("Style" tab, "Row picker" element, "Picker" option corresponding to "Left arrow").
The selected elements will be retrieved: - with TableSelect. The tsRow, tsColumn, tsCellLine and tsCellColumn constants are used to respectively retrieve information about the rows, the columns and the cells.
- with TableSelectCount. The tsRow, tsColumn, tsCellLine and tsCellColumn constants are used to respectively retrieve the number of rows, columns and cells.
Example: The following example is used to retrieve detailed statistics for the selected cells in the Table control.
// Retrieve the number of selected cells NbSelected is int NbSelected = TableSelectCount(TABLE_DetailedStats, tsCell) // Browse the selected cells FOR i = 1 _TO_ NbSelected // Retrieve the row and the column nRow = TableSelect(TABLE_DetailedStats, i, tsCellLine) nColumn = TableSelect(TABLE_DetailedStats, i, tsCellColumn) // Process ... END
Selection mode The selection modes define how the different elements of Table control (row, column, cell) can be selected by the user or by programming. This selection mode is defined when creating the control. It can be modified at any time in the "UI" tab of the characteristics of Table control. The available selection modes are as follows: - No selection: No selection bar will be displayed, however the selected row, column or cell will have focus (it will be bordered by dots). A row, a column or a cell can be selected by a click on this element or by programming.
- Single selection: The selected row, column or cell will be displayed underneath the selection bar. A row, a column or a cell can be selected by a click on this element or by programming.
- Multi-selection: Several rows, columns or cells of the Table control can be selected at the same time:
- with the Shift key if the rows, columns or cells are consecutive or with the Ctrl key if the elements are not consecutive.
- by programming.
In this case, the number of selection bars will be equal to the number of selected elements.
Remarks: - A WLanguage error will occur if you try to perform a multiple selection by programming while the selection mode is set to "Simple selection".
- During a multiple selection by cell, to select a row, all the cells found in the row must be selected. To simplify this operation, you have the ability to display a row picker ("Style" tab, "Row picker" element, "Picker" option corresponding to "Left arrow").
The selected elements will be retrieved: - with TableSelect. The tsRow, tsColumn, tsCellLine and tsCellColumn constants are used to respectively retrieve information about the rows, the columns and the cells.
- with TableSelectCount. The tsRow, tsColumn, tsCellLine and tsCellColumn constants are used to respectively retrieve the number of rows, columns and cells.
Example: The following example is used to retrieve detailed statistics for the selected cells in the Table control.
// Retrieve the number of selected cells NbSelected is int NbSelected = TableSelectCount(TABLE_DetailedStats, tsCell) // Browse the selected cells FOR i = 1 _TO_ NbSelected // Retrieve the row and the column nRow = TableSelect(TABLE_DetailedStats, i, tsCellLine) nColumn = TableSelect(TABLE_DetailedStats, i, tsCellColumn) // Process ... END
Display options of columns Several options are available for configuring the display of columns. These options are available in the "Details" tab of the description window of the Table control. The column titles are multiline by default. The height of header is automatically adjusted to the number of rows. The titles of columns support the RTF format. Remarks: Versions 18 and later You have the ability to define title-headers of columns. A title-header of columns is an additional title displayed above the title of one or more columns. New in version 18 You have the ability to define title-headers of columns. A title-header of columns is an additional title displayed above the title of one or more columns.  You have the ability to define title-headers of columns. A title-header of columns is an additional title displayed above the title of one or more columns.
See Managing the titles of columns in a Table control for more details. Scrollbars in a Table control Options kept for backward compatibility with the earlier versions Forcing the title to be single-line By default, the title of columns found in a Table control is multiline. The option "Force title in a singleline (8)" allows you to go back to the default behavior of version 8. On the Table controls created with version 8 (or earlier), this option must be unchecked in order to get a multiline column title.
This page is also available for…
|
|
|