|
|
|
|
|
- Overview
- How to create a Container column?
- Steps to follow
- Main control of a Container column
- Limitations
- Using a Container column
- Table control based on a data file or Table control based on a variable
- Table control populated programmatically
- Manipulating the controls found in the Container column
- Limitation: Type of fields not available
Container column of a Table control (prefix syntax)
A table cell can contain a set of controls. Several types of controls can be include in a Container column: - Static Text control,
- edit control,
- Image control,
- Button control,
- Chart control,
- Table control,
- Internal Window control,
- etc.
A main control can be defined for the cell. This control will be the one used: - for the additions performed programmatically,
- for the sorts,
- for the link with the data (link with an item or with a variable), ...
How to create a Container column? Steps to follow To create a Container column in a Table control: - If necessary, create a Table control (based on a data file, populated programmatically or based on a variable).
- Create a Container column (via the context 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. It is possible to:
- move the existing controls in the window to the Container column.
- drag and drop the items from the analysis displayed in the "Project explorer" pane.
- 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.
- Programming additions or modifications: the value of the column indicated in function <Table>.AddLine, for example, will be assigned to the main field.
- Exports made from the Table field (exports to Excel, Open Office, Word, etc.) will take into account the value of the column's main field.
- 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. Limitations - In Container columns, a string must be assigned to Check Box controls using the following format: "<True/False>;<True/False>;<True/False>...".
Similarly, the value returned by these Check Box controls is a string in the following format: "<True/False>;<True/False>;<True/False>...". - The captions of the options found in the Radio Button and Check Box controls cannot be customized for each row in a Container column.
- To use a control with a different value for each row found in a Container column, all you have to do is include this control in an internal window and insert an Internal Window control into the column. This tip can be used, for example, for Picker, Check Box control, etc. fields.
Table control based on a data file or Table control based on a variable A Table control based on a data file 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 main field bound to the data file item. The Container column is linked to no item.
- solution 2: link the Container column to the field associated with the main field and remove the link at field level.
Table control populated programmatically A Table control populated programmatically can contain one or more Container columns. The main control of the Container column will be manipulated programmatically by the Table control functions 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:
NumLigne is int
NumLigne = TABLE_Table2.AjouteLigne("Moulain")
COL_Colonne1[NumLigne].SAI_Prenom = "Florence"
Manipulating the controls found in the Container column The controls found in a Container column can be handled via the following syntax: <Nom de la colonne>[<Numéro de Ligne>].<Nom du champ> For example: - Assigning a value to a control:
COL_Colonne1[NumLigne].SAI_Prenom = "Florence"
- Assigning elements to a Combo Box control of a container:
COL_Colonne1[NumLigne].COMBO_Combo1.Contenu = "Elément 1" + CR + "Elément 2"
- Modifying a control property:
COL_Colonne1[NumLigne].PrixHT.Couleur = LightRed
- Indirection on a control in a Container column:
sNomChampDansColoneConteneur is string
sNomChampDansColoneConteneur = "TABLE_AvecColConteneur.COL_Conteneur[" + ...
nIndiceLigne + "].SAI_DansColConteneur"
Info({sNomChampDansColoneConteneur})
- Adding a row into a Table control found in a Container column:
TABLE_AVEC_TABLE_INTEGREE[NumLigne].TABLE_Dans_Conteneur.AjouteLigne("Contenu_Col1", "Contenu_Col2")
- Handling a Check Box control inserted into an internal window:
TABLE_SansNom1[NumLigne].FI_SansNom1.INT_Interrupteur[Indice] = True
- Change the internal window in an Internal Window control of a Container column:
ChangeSourceWindow(TABLE_SansNom1[NumLigne].CFI_ChampFenêtreInterne, FI_FenêtreInterne1)
Remark: For a Table based on a data file field, it is advisable to manipulate the fields of a Container column in the "Display a line" event. Limitation: Type of fields not available - The following fields are not supported in a Container column:
- Looper control,
- Dashboard control,
- Chart control,
- Scheduler control,
- Organizer control,
- Camera control,
- PDF Reader control,
- Map control.
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|