- How to create a Container column?
- The different steps
- Main control of a Container column
- Using a Container column
- Browsing Table control or Table control on source
- Memory Table control
- Handling the controls found in the Container column
- Limit: Unavailable control types
Container column of a Table control (prefixed syntax)
A table cell can contain a set of controls. Several types of controls can be include in a Container column:
- Static control,
- edit control,
- Image control,
- Button control,
Versions 16 and later Chart control, New in version 16 Chart control, Chart control, Versions 16 and later Table control, New in version 16 Table control, Table control, Versions 16 and later Internal Window control, New in version 16 Internal Window control, Internal Window control,
A main control can be defined for the cell. This control will be the one used:
- for the additions performed by programming,
- for the sorts,
- for the link with the data (link with an item or with a variable), ...
The Container columns are available in Java.
The Container columns are available for the TreeView Table controls.
How to create a Container column?
The different steps
To create a Container column in a Table control:
- If necessary, create a Table control (browsing, memory or on source).
- Create a Container column (via the popup menu of the Table control or from the description window of the Table control).
- Increase (if necessary) the height of the rows found in the Table control with the mouse.
- Position the requested controls in the Container cell of the first row found in the Table control. You can:
- move the existing controls found in the window to the Container column.
- drag/drop the items of the analysis displayed in the project explorer.
- In the description of the Container column, specify (if necessary) the main control of the column ("General" tab) and validate.
Main control of a Container column
The main control of the Container column corresponds to the control handled by default in the column. For example:
- The sort of the Container column will be performed on the main control.
- The searches performed in a Container column will be performed on the main control.
- The additions, the modifications, ... performed by programming: the value of the column specified in <Table>.AddLine for example will be assigned to the main control.
- The exports performed from the Table control (exports to Excel, Open Office, Word, ...) will take into account the value of the main control of the column.
- If the Container column is linked to a data file or to a variable, the control actually linked will be the main control.
The definition of a main control in a Container column is optional.
Notes: Internal window, Chart control and Table control in a Container column
- Uncheck "Identical content for all the rows" ("UI" tab of the control description) in order to get a different display on each row.
- The controls of the internal window, the Chart controls and the Table controls must be filled by programming.
Browsing Table control or Table control on source
A browsing Table control can contain one or more Container columns. The controls found in this Container column can display the records of the data file for example.
In this case, the Table control is linked to the data file.
Each control found in the Container column is linked to the corresponding item.
If a main control is defined on the Table control, we advise you to:
- solution 1: keep the link between the main control and the item found in the data file. The Container column is linked to no item.
- solution 2: link the Container column to the item associated with the main control and delete the link at control level.
Memory Table control
A memory Table control can contain one or more Container columns. The main control of Container column will be handled by the programming functions of memory Table control.
For example, when a row is added by <Table>.AddLine
, only the main control of the column will be assigned with the value defined by the column. If several controls must be initialized in the column, you must use the syntax described in the next paragraph. For example:
RowNum is int
RowNum = TABLE_Table2.AddLine("Mitchell")
COL_Column1[RowNum].EDT_FirstName = "Flora"
Handling the controls found in the Container column
The controls found in a Container column can be handled via the following syntax:
<Column name>[<Row number>].<Control name>
- Assigning a value to a control:
COL_Column1[RowNum].EDT_FirstName = "Flora"
- Assigning elements to a Combo Box control of a container:
COL_Column1[RowNum].COMBO_Combo1..Content = "Element 1" + CR + "Element 2"
- Modifying a control property:
COL_Column1[RowNum].PriceBT..Color = LightRed
- Indirection on a control in a Container column:
sControlNameInContainerColumn is string
sControlNameInContainerColumn = "TABLE_WithContainerCol.COL_Container[" + ...
nRowSubscript + "].EDT_InContainerCol"
//sControlNameInContainerColumn = "TABLE_WithContainerCol[" + ...
// nRowSubscript + "].COL_Container.EDT_InContainerCol"
- Adding a row into a Table control found in a Container column:
- Handling a Check Box control inserted into an internal window:
TABLE_NoName1[RowNum].IW_NoName1.CBOX_CheckBox[Subscript] = True
- Change the internal window in an Internal Window control of a Container column:
// Load the internal window IW_Internal Window1, on the row RowNum of an Internal Window control
// named IWC_InternalWindowControl in a container column of a Table control
// Caution: the IWC_InternalWindowControl control must have
// the option "Identical content for all the rows" unchecked
// ("UI" tab of the description window)
: For a browsing Table control, the controls of a Container column should be handled in the event "Row display".
Limit: Unavailable control types
In a Container column, all the controls can be used, either directly, or via an internal window.
This page is also available for…