PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Initial status of Table control
  • Details of display options
  • Selection mode
  • Selection mode
  • Display options of columns
  • Managing the fill of a memory Table control
  • Display the details of a row in an internal window
  • 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
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
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
Android The Table control is now available for the Android applications.
iPhone/iPad The Table control is now available for the iPhone/iPad applications.
New in version 20
Android The Table control is now available for the Android applications.
iPhone/iPad The Table control is now available for the iPhone/iPad applications.
Android The Table control is now available for the Android applications.
iPhone/iPad The Table control is now available for the iPhone/iPad applications.
Initial status of Table control
The initial status of a Table control can be:
Initial status of Table control
This initial status is defined when creating the control and it can be modified at any time in the "GUI" tab of the characteristics of the 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.
    iPhone/iPad 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.
      Note: The value of the 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.
    Note: The value of the 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

Selection mode

The selection modes define how a row of the Table control 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 "GUI" tab of the characteristics of the Table control.
The available selection modes are as follows:
  • No selection: No selection bar will be displayed, however the selected row will have focus (it will be bordered by dots). A row can be selected by clicking this row or by programming.
  • Single selection: The selected row will be displayed underneath the selection bar. A row can be selected by clicking this row or by programming.
    Versions 20 and later
    AndroidiPhone/iPad Android/iOS selection mode: This option is used to hide the selection bar after the selection. This allows you to get the standard operating mode on these platforms: the bar appears when pressing on the row. Then, the code for row selection is run.
    New in version 20
    AndroidiPhone/iPad Android/iOS selection mode: This option is used to hide the selection bar after the selection. This allows you to get the standard operating mode on these platforms: the bar appears when pressing on the row. Then, the code for row selection is run.
    AndroidiPhone/iPad Android/iOS selection mode: This option is used to hide the selection bar after the selection. This allows you to get the standard operating mode on these platforms: the bar appears when pressing on the row. Then, the code for row selection is run.
  • Multi-selection: You have the ability to select several rows simultaneously:
    • with the SHIFT key if the rows are consecutive or with the CTRL key if the rows are not consecutive.
    • by programming.
      In this case, the number of selection bars is equal to the number of selected rows.
Note: A WLanguage error will occur if you try to perform a multiple selection by programming while the selection mode of control is set to "Single selection".
The multiple selection is available for the "Browsing table" controls.
The selected elements will be retrieved by browsing the rows selected in the control. TableSelectCount is used to find out the number of rows selected in the Table control:
// Traces the content of selected rows
i is int
NbSelected is int = TableSelectCount(TABLE_Product)
FOR i = 1 TO NbSelected
Trace("Selected row: " + TABLE_Product[TableSelect(TABLE_Product, i)])
END
Versions 16 and later
WINDEV A selection mode can be defined for the rows, columns and cells of a Table control.
New in version 16
WINDEV A selection mode can be defined for the rows, columns and cells of a Table control.
WINDEV A selection mode can be defined for the rows, columns and cells of a Table control.
Versions 16 and later

Selection mode

The selection modes define how the different elements of the 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 "GUI" tab of the characteristics of the Table control.
The available selection modes are as follows:
Selection modes
  • 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.
Notes:
  • 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:
  • by browsing the rows selected in the Table control. TableSelectCount is used to find out the number of rows selected in the control.
    // Traces the content of selected rows
    i is int
    NbSelected is int = TableSelectCount(TABLE_Product)
    FOR i = 1 TO NbSelected
    Trace("Selected row: " + TABLE_Product[TableSelect(TABLE_Product, i)])
    END
  • by browsing the columns selected in the Table control. TableColumnSelectOccurrence is used to find out the number of columns selected in the control.
    // Traces the content of selected columns
    i is int
    NbSelected is int = TableColumnSelectOccurrence(TABLE_Product
    FOR i = 1 TO NbSelected
    Trace("Selected column: " + Table_PRODUCT[TableColumnSelect(TABLE_Product, i)])
    END
  • by browsing the cells selected in the Table control. TableCellSelectOccurrence is used to find out the number of cells selected in the control.
    // Traces the content of selected cells
    i is int
    NbSelected is int = TableCellSelectOccurrence(TABLE_Product)
    FOR i = 1 TO NbSelected
    Trace("Selected cell: " + ...
    TABLE_Product[TableCellSelect(TABLE_Product, i, tcsLine)]
    [TableCellSelect(TABLE_Product, i, tcsColumn)])
    END
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
AndroidiPhone/iPadWindows MobileJava Only the selection mode of rows is available.
New in version 16

Selection mode

The selection modes define how the different elements of the 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 "GUI" tab of the characteristics of the Table control.
The available selection modes are as follows:
Selection modes
  • 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.
Notes:
  • 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:
  • by browsing the rows selected in the Table control. TableSelectCount is used to find out the number of rows selected in the control.
    // Traces the content of selected rows
    i is int
    NbSelected is int = TableSelectCount(TABLE_Product)
    FOR i = 1 TO NbSelected
    Trace("Selected row: " + TABLE_Product[TableSelect(TABLE_Product, i)])
    END
  • by browsing the columns selected in the Table control. TableColumnSelectOccurrence is used to find out the number of columns selected in the control.
    // Traces the content of selected columns
    i is int
    NbSelected is int = TableColumnSelectOccurrence(TABLE_Product
    FOR i = 1 TO NbSelected
    Trace("Selected column: " + Table_PRODUCT[TableColumnSelect(TABLE_Product, i)])
    END
  • by browsing the cells selected in the Table control. TableCellSelectOccurrence is used to find out the number of cells selected in the control.
    // Traces the content of selected cells
    i is int
    NbSelected is int = TableCellSelectOccurrence(TABLE_Product)
    FOR i = 1 TO NbSelected
    Trace("Selected cell: " + ...
    TABLE_Product[TableCellSelect(TABLE_Product, i, tcsLine)]
    [TableCellSelect(TABLE_Product, i, tcsColumn)])
    END
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
AndroidiPhone/iPadWindows MobileJava Only the selection mode of rows is available.

Selection mode

The selection modes define how the different elements of the 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 "GUI" tab of the characteristics of the Table control.
The available selection modes are as follows:
Selection modes
  • 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.
Notes:
  • 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:
  • by browsing the rows selected in the Table control. TableSelectCount is used to find out the number of rows selected in the control.
    // Traces the content of selected rows
    i is int
    NbSelected is int = TableSelectCount(TABLE_Product)
    FOR i = 1 TO NbSelected
    Trace("Selected row: " + TABLE_Product[TableSelect(TABLE_Product, i)])
    END
  • by browsing the columns selected in the Table control. TableColumnSelectOccurrence is used to find out the number of columns selected in the control.
    // Traces the content of selected columns
    i is int
    NbSelected is int = TableColumnSelectOccurrence(TABLE_Product
    FOR i = 1 TO NbSelected
    Trace("Selected column: " + Table_PRODUCT[TableColumnSelect(TABLE_Product, i)])
    END
  • by browsing the cells selected in the Table control. TableCellSelectOccurrence is used to find out the number of cells selected in the control.
    // Traces the content of selected cells
    i is int
    NbSelected is int = TableCellSelectOccurrence(TABLE_Product)
    FOR i = 1 TO NbSelected
    Trace("Selected cell: " + ...
    TABLE_Product[TableCellSelect(TABLE_Product, i, tcsLine)]
    [TableCellSelect(TABLE_Product, i, tcsColumn)])
    END
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
AndroidiPhone/iPadWindows MobileJava Only the selection mode of rows is available.

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.
You have the ability to display the column titles over several lines. The height of header is automatically adjusted to the number of rows. The titles of columns support the RTF format.
This option is available in the "Details" tab of the description window of the Table control.
Display options of columns
Display options of columns
The titles of columns are multiline by default. The height of header is automatically adjusted to the number of rows. The titles of columns support the RTF format.
Notes:
  • Versions 16 and later
    WINDEV For the columns with a large title and a reduced content, you have the ability to reduce the size of the columns by changing the orientation of the title (or by writing it vertically for example). To do so, specify the requested angle in the "Details" tab of the description of the table control. This option can be modified by programming with ..OrientationTitle.
    New in version 16
    WINDEV For the columns with a large title and a reduced content, you have the ability to reduce the size of the columns by changing the orientation of the title (or by writing it vertically for example). To do so, specify the requested angle in the "Details" tab of the description of the table control. This option can be modified by programming with ..OrientationTitle.
    WINDEV For the columns with a large title and a reduced content, you have the ability to reduce the size of the columns by changing the orientation of the title (or by writing it vertically for example). To do so, specify the requested angle in the "Details" tab of the description of the table control. This option can be modified by programming with ..OrientationTitle.
  • Versions 18 and later
    WINDEVAndroidiPhone/iPad 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
    WINDEVAndroidiPhone/iPad 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.
    WINDEVAndroidiPhone/iPad 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.
Versions 22 and later
Windows
Managing the fill of a memory Table control
Specific information can be displayed when filling a memory Table control:
  • Progress bar,
  • Information window, ...
To display an information when filling a memory Table or TreeView Table control:
  1. Display the description window of Table or TreeView Table control.
  2. In the "GUI" tab of the description window of control, check "Display an internal window above the rows".
  3. Specify (if necessary) the internal window that will be used. You can:
    • use the window proposed by default by WINDEV ("None" option).
    • import into the project the preset window proposed by WINDEV in order to customize it ("Preset window" option). If this option is selected, the internal window is immediately added into the current project and it is associated with the feature.
      Note: We advise you to copy the window into the directory of current project. The internal window is named "IW_TableLoadStatus".
  4. Validate (if necessary) the description window of control.
  5. To enable this mechanism, call TableStartFilling and TableEndFilling to frame the code used to fill the Table control.
Notes:
  • By default, the "No available data" message is displayed in the empty Table control. During the fill operation, an infinite progress bar is displayed at the bottom of the Table control.
  • The internal window proposed by default contains 3 planes:
    • Plane 1 containing an infinite progress bar.
    • Plane 2 containing the caption displayed if the Table control is empty. The caption "No available data" is displayed by default.
    • Plane 3 containing the caption displayed before the call to TableStartFilling.
  • The internal window "IW_TableLoadStatus" is also used to manage the fill operation for the memory Looper controls.
New in version 22
Windows
Managing the fill of a memory Table control
Specific information can be displayed when filling a memory Table control:
  • Progress bar,
  • Information window, ...
To display an information when filling a memory Table or TreeView Table control:
  1. Display the description window of Table or TreeView Table control.
  2. In the "GUI" tab of the description window of control, check "Display an internal window above the rows".
  3. Specify (if necessary) the internal window that will be used. You can:
    • use the window proposed by default by WINDEV ("None" option).
    • import into the project the preset window proposed by WINDEV in order to customize it ("Preset window" option). If this option is selected, the internal window is immediately added into the current project and it is associated with the feature.
      Note: We advise you to copy the window into the directory of current project. The internal window is named "IW_TableLoadStatus".
  4. Validate (if necessary) the description window of control.
  5. To enable this mechanism, call TableStartFilling and TableEndFilling to frame the code used to fill the Table control.
Notes:
  • By default, the "No available data" message is displayed in the empty Table control. During the fill operation, an infinite progress bar is displayed at the bottom of the Table control.
  • The internal window proposed by default contains 3 planes:
    • Plane 1 containing an infinite progress bar.
    • Plane 2 containing the caption displayed if the Table control is empty. The caption "No available data" is displayed by default.
    • Plane 3 containing the caption displayed before the call to TableStartFilling.
  • The internal window "IW_TableLoadStatus" is also used to manage the fill operation for the memory Looper controls.
Windows
Managing the fill of a memory Table control
Specific information can be displayed when filling a memory Table control:
  • Progress bar,
  • Information window, ...
To display an information when filling a memory Table or TreeView Table control:
  1. Display the description window of Table or TreeView Table control.
  2. In the "GUI" tab of the description window of control, check "Display an internal window above the rows".
  3. Specify (if necessary) the internal window that will be used. You can:
    • use the window proposed by default by WINDEV ("None" option).
    • import into the project the preset window proposed by WINDEV in order to customize it ("Preset window" option). If this option is selected, the internal window is immediately added into the current project and it is associated with the feature.
      Note: We advise you to copy the window into the directory of current project. The internal window is named "IW_TableLoadStatus".
  4. Validate (if necessary) the description window of control.
  5. To enable this mechanism, call TableStartFilling and TableEndFilling to frame the code used to fill the Table control.
Notes:
  • By default, the "No available data" message is displayed in the empty Table control. During the fill operation, an infinite progress bar is displayed at the bottom of the Table control.
  • The internal window proposed by default contains 3 planes:
    • Plane 1 containing an infinite progress bar.
    • Plane 2 containing the caption displayed if the Table control is empty. The caption "No available data" is displayed by default.
    • Plane 3 containing the caption displayed before the call to TableStartFilling.
  • The internal window "IW_TableLoadStatus" is also used to manage the fill operation for the memory Looper controls.
Versions 22 and later
Windows
Display the details of a row in an internal window
A table row displays various information in its different columns. However, to get a more readable interface, why not display this information in a popup window?
To display a window corresponding to the details of a row found in a Table/TreeView Table control:
  1. Display the description window of Table or TreeView Table control.
  2. In the "GUI" tab of the description window of the control, in the "Internal window for row details" section, specify:
    • the internal window that will be used to display the row details. This internal window is an internal window of your project.
    • the left indent of the internal window (in relation to the control).
    • whether the internal window must be displayed when the row is hovered. In this case, the internal window will be displayed after a 1-second rollover.
  3. Validate the description window.
  4. A "+" sign is displayed in the first table column.
At run time:
  • A "+"/"-" sign allows the user to display/close the row details. This element can be customized via the table style ("Style" tab, "Image +/- IW for row details" element).
  • The row is enlarged in height to display the internal window. The internal window is displayed below the data found in the row.
Characteristics of internal window:
  • To get information about the Table/TreeView Table control that displays the details, the internal window must use the following prototype:
    PROCEDURE <Name of Internal Window>(<Parent Table>, <Row Number>)
    where:
    • Parent Table: corresponds to the name of the Table or TreeView Table control that displayed the internal window.
    • Row Number: corresponds to the number of the row that displayed the internal window.
    These parameters are automatically filled at run time.
  • The internal window can contain all types of controls (including a Table control).
  • The internal window can be used to modify the information displayed in the Table control. In this case, you have the ability to use a button in the internal window allowing you to validate the modified data. The code of this button can be:
    ScreenToFile()
    HSave()
    TableDisplay(TableName, taCurrentSelection)
    TableCollapse(TableName)
  • In the internal window, you have the ability to access the control of the parent table. For example, to access a control found in a Container column:
    gCTable[gnRowNum].BTN_Modify..State = Grayed
  • The controls found in the internal window can be anchored: resizing the table in width or resizing the current row in height affects these anchors.
  • The captions of controls found in the internal window can have the "Text" color in order to adapt the color of these captions in row selection.
Notes:
  • To display/close the internal window by programming, use TableExpand/TableCollapse.
  • The height of the row that displays the internal window corresponds to the initial height of the row plus the one of the internal window in edit (..InitialHeight).
  • The background image defined for the row is enlarged to correspond to the size of the expanded row.
  • Several properties are used to manage the characteristics of the internal window by programming:
    Versions 22 and later
    IndentLineDetails
    New in version 22
    IndentLineDetails
    IndentLineDetails
    ..IndentLineDetails is used to find out and modify the value of left indent in the internal window used to display the details of a row found in a Table control.
    Versions 22 and later
    WinLineDetails
    New in version 22
    WinLineDetails
    WinLineDetails
    ..WinLineDetails is used to find out and modify the name of the internal window used to display the details of a row found in a Table control.
  • Special cases
    • This feature is not available for the Horizontal Table controls.
    • The interface of internal window cannot be modified by the end user.
New in version 22
Windows
Display the details of a row in an internal window
A table row displays various information in its different columns. However, to get a more readable interface, why not display this information in a popup window?
To display a window corresponding to the details of a row found in a Table/TreeView Table control:
  1. Display the description window of Table or TreeView Table control.
  2. In the "GUI" tab of the description window of the control, in the "Internal window for row details" section, specify:
    • the internal window that will be used to display the row details. This internal window is an internal window of your project.
    • the left indent of the internal window (in relation to the control).
    • whether the internal window must be displayed when the row is hovered. In this case, the internal window will be displayed after a 1-second rollover.
  3. Validate the description window.
  4. A "+" sign is displayed in the first table column.
At run time:
  • A "+"/"-" sign allows the user to display/close the row details. This element can be customized via the table style ("Style" tab, "Image +/- IW for row details" element).
  • The row is enlarged in height to display the internal window. The internal window is displayed below the data found in the row.
Characteristics of internal window:
  • To get information about the Table/TreeView Table control that displays the details, the internal window must use the following prototype:
    PROCEDURE <Name of Internal Window>(<Parent Table>, <Row Number>)
    where:
    • Parent Table: corresponds to the name of the Table or TreeView Table control that displayed the internal window.
    • Row Number: corresponds to the number of the row that displayed the internal window.
    These parameters are automatically filled at run time.
  • The internal window can contain all types of controls (including a Table control).
  • The internal window can be used to modify the information displayed in the Table control. In this case, you have the ability to use a button in the internal window allowing you to validate the modified data. The code of this button can be:
    ScreenToFile()
    HSave()
    TableDisplay(TableName, taCurrentSelection)
    TableCollapse(TableName)
  • In the internal window, you have the ability to access the control of the parent table. For example, to access a control found in a Container column:
    gCTable[gnRowNum].BTN_Modify..State = Grayed
  • The controls found in the internal window can be anchored: resizing the table in width or resizing the current row in height affects these anchors.
  • The captions of controls found in the internal window can have the "Text" color in order to adapt the color of these captions in row selection.
Notes:
  • To display/close the internal window by programming, use TableExpand/TableCollapse.
  • The height of the row that displays the internal window corresponds to the initial height of the row plus the one of the internal window in edit (..InitialHeight).
  • The background image defined for the row is enlarged to correspond to the size of the expanded row.
  • Several properties are used to manage the characteristics of the internal window by programming:
    Versions 22 and later
    IndentLineDetails
    New in version 22
    IndentLineDetails
    IndentLineDetails
    ..IndentLineDetails is used to find out and modify the value of left indent in the internal window used to display the details of a row found in a Table control.
    Versions 22 and later
    WinLineDetails
    New in version 22
    WinLineDetails
    WinLineDetails
    ..WinLineDetails is used to find out and modify the name of the internal window used to display the details of a row found in a Table control.
  • Special cases
    • This feature is not available for the Horizontal Table controls.
    • The interface of internal window cannot be modified by the end user.
Windows
Display the details of a row in an internal window
A table row displays various information in its different columns. However, to get a more readable interface, why not display this information in a popup window?
To display a window corresponding to the details of a row found in a Table/TreeView Table control:
  1. Display the description window of Table or TreeView Table control.
  2. In the "GUI" tab of the description window of the control, in the "Internal window for row details" section, specify:
    • the internal window that will be used to display the row details. This internal window is an internal window of your project.
    • the left indent of the internal window (in relation to the control).
    • whether the internal window must be displayed when the row is hovered. In this case, the internal window will be displayed after a 1-second rollover.
  3. Validate the description window.
  4. A "+" sign is displayed in the first table column.
At run time:
  • A "+"/"-" sign allows the user to display/close the row details. This element can be customized via the table style ("Style" tab, "Image +/- IW for row details" element).
  • The row is enlarged in height to display the internal window. The internal window is displayed below the data found in the row.
Characteristics of internal window:
  • To get information about the Table/TreeView Table control that displays the details, the internal window must use the following prototype:
    PROCEDURE <Name of Internal Window>(<Parent Table>, <Row Number>)
    where:
    • Parent Table: corresponds to the name of the Table or TreeView Table control that displayed the internal window.
    • Row Number: corresponds to the number of the row that displayed the internal window.
    These parameters are automatically filled at run time.
  • The internal window can contain all types of controls (including a Table control).
  • The internal window can be used to modify the information displayed in the Table control. In this case, you have the ability to use a button in the internal window allowing you to validate the modified data. The code of this button can be:
    ScreenToFile()
    HSave()
    TableDisplay(TableName, taCurrentSelection)
    TableCollapse(TableName)
  • In the internal window, you have the ability to access the control of the parent table. For example, to access a control found in a Container column:
    gCTable[gnRowNum].BTN_Modify..State = Grayed
  • The controls found in the internal window can be anchored: resizing the table in width or resizing the current row in height affects these anchors.
  • The captions of controls found in the internal window can have the "Text" color in order to adapt the color of these captions in row selection.
Notes:
  • To display/close the internal window by programming, use TableExpand/TableCollapse.
  • The height of the row that displays the internal window corresponds to the initial height of the row plus the one of the internal window in edit (..InitialHeight).
  • The background image defined for the row is enlarged to correspond to the size of the expanded row.
  • Several properties are used to manage the characteristics of the internal window by programming:
    Versions 22 and later
    IndentLineDetails
    New in version 22
    IndentLineDetails
    IndentLineDetails
    ..IndentLineDetails is used to find out and modify the value of left indent in the internal window used to display the details of a row found in a Table control.
    Versions 22 and later
    WinLineDetails
    New in version 22
    WinLineDetails
    WinLineDetails
    ..WinLineDetails is used to find out and modify the name of the internal window used to display the details of a row found in a Table control.
  • Special cases
    • This feature is not available for the Horizontal Table controls.
    • The interface of internal window cannot be modified by the end user.
Scrollbars in a Table control
WindowsLinuxWindows Mobile By default, the scrollbars found in Table controls (browsing table, memory table or table on source) are proportional scrollbars. The size of the scrollbar is proportional to the number of elements to display.
Caution: if a filter is used with a proportional scrollbar, the data source is browsed in background task. The "end of initialization" code will be run when the browse is ended. Depending on the data source to browse, this process may be run for quite a long time after the window opening.
The options regarding the scrollbar are grouped in the "Details" tab of the description of the Table control:
Parameters of the scrollbar in a Table control
The option "Move by pixel" allows for a soft move of the rows: instead of "jumping" from a row to another one, the move is performed pixel by pixel: a "multiline" row of a Table control can be truncated if necessary when it is displayed.
Note: Disabling the proportional scrollbar disables the multi-selection of rows.
Versions 15 and later
WindowsWindows Mobile The "Move with finger" option is used to specify that the Table control accepts the scrolling with finger (if the display device is touch-enabled). This option is enabled by default in WINDEV Mobile for the new Table controls. In WINDEV, it is disabled by default.
New in version 15
WindowsWindows Mobile The "Move with finger" option is used to specify that the Table control accepts the scrolling with finger (if the display device is touch-enabled). This option is enabled by default in WINDEV Mobile for the new Table controls. In WINDEV, it is disabled by default.
WindowsWindows Mobile The "Move with finger" option is used to specify that the Table control accepts the scrolling with finger (if the display device is touch-enabled). This option is enabled by default in WINDEV Mobile for the new Table controls. In WINDEV, it is disabled by default.
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 the title to single-line" is used to restore 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.
WINDEVWindows Mobile

5.5-compatible input mode

This mode is used to restore the operating mode of the Table controls in version 5.5. This option is automatically checked if the Table control comes from a migrated WINDEV 5.5 application. This option is available in the "Details" tab of the description of the Table control.
This option must not be used for Table controls created with version 7 (or later) of WINDEV.
All the features of the Table controls will be accessible if this option is unchecked. To restore the operating mode of the Table controls in WINDEV 5.5, the code of control must be adapted.
Two types of Table controls are available if this option is checked:
  • editable Table control without selection.
  • non-editable Table control with selection and input (if no column is in edit or if the Table control is in selection without edit).
Reminder: in version 5.5, if the Table control was defined:
  • as "editable" and if at least one control column was in edit, the selection band was not displayed and it was possible to perform an input in the Table control.
  • as "editable" (or "inactive") and with no column in edit, the user could not perform any input in the Table control but he could modify the position of the selection bar.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment