|
|
|
|
|
- Use conditions
- Branch to collapse or expand
- Managing the selection bar during collapse
- Managing the selection bar during expansion
- Runtime speed for the TreeView Table controls
TableCollapseExpand (Function) In french: TableEnrouleDeroule Collapses or expands an element in a Table or TreeView Table control. Table control: - Collapses the break if it is expanded. The elements of the break are no longer visible in the Table control.
- Expands the break if it is collapsed. The elements of the break are then visible in the Table control.
- collapses or expands the details of a row (For more details, see Managing the details of a row in a Table control):
- Collapses the window if it is expanded.
- Expands the window if it is collapsed.
// Collapses or expands the selected branch in the TreeView Table control SWITCH TableCollapseExpand(TVT_Schedule) CASE taCollapse Info(" Branch expanded. ") CASE taExpand Info(" Branch collapsed. ") CASE taError Info(" Branch not found. ") END
// Expands or collapses the the first row of "TVT_Schedule" TableCollapseExpand(TVT_Schedule, 1)
// Collapses or expands the specified branch in the TreeView Table control TableCollapseExpand(TVT_Schedule, "MyRoot" + TAB + "MyBranch")
// Collapses or expands the break of the current row in "TABLE_Break" TableCollapseExpand(TABLE_Break, TABLE_Break)
Syntax
TreeView Table: Collapsing or expanding a branch, specifying the row number Hide the details
<Result> = TableCollapseExpand(<TreeView Table control> [, <Row used>])
<Result>: Integer State of the specified branch before calling the function: | | taCollapse | Branch collapsed. | taError | Branch not found. | taExpand | Branch expanded. |
<TreeView Table control>: Control name Name of the TreeView Table control to be used. <Row used>: Optional integer Number of the row containing the branch to collapse or expand. If this parameter is not specified, the branch contained in the current row is used.
Table with breaks: Collapsing or expanding a break Hide the details
<Result> = TableCollapseExpand(<Table control> [, <Row used> [, <Break>]])
<Result>: Integer State of the specified break before calling the function: | | taCollapse | Branch collapsed. | taError | Branch not found. | taExpand | Branch expanded. |
<Table control>: Control name Name of the Table control to be used. This control must have one or more breaks. Otherwise, this function has no effect. <Row used>: Optional integer Number of row with break to collapse or expand. This number must correspond to the number of the current row or to the number of the first row with the break to expand or collapse. If this parameter is not specified, the break of the current row is used. <Break>: Optional character string Name of break to collapse or expand. This parameter must be specified in case of nested breaks. It allows you to define the break that will be collapsed or expanded. By default, no break is used if the breaks are nested. Remarks Use conditions TableCollapseExpand can be used on: - a TreeView Table control.
- a Table control based on a data file.
- a Table control populated programmatically.
- a Table control in "Server" or "Server + AJAX" mode.
- a Table control in "Browser" mode.
This function cannot be used on the Table controls based on a data file (direct access). Branch to collapse or expand TableCollapseExpand has no effect: | | TreeView Table control | Table control with breaks | - if the branch to use cannot be found.
- if the branch to use is a leaf.
- if the branch to use is already collapsed.
| - if the Table control contains no break.
- if the Table control contains several breaks and the break to use is not specified.
- if no row is selected in the Table control and if <Row number> is not specified.
| Note for the TreeView Table controls: - If the parameter <Row used> or <Branch used> corresponds to the branch contained in the first row, the whole tree structure of the TreeView is collapsed (equivalent to TableCollapseAll) or expanded (equivalent to TableExpandAll).
- When TableCollapseExpand is called, if the specified branch is expanded and has an associated procedure via the AddChildDelayed property, this procedure will be executed.
Managing the selection bar during collapse For the TreeView Table controls: - If the selection bar was positioned on one of the elements of the node to collapse, it is positioned on the collapsed or expanded node after the call to TableCollapseExpand.
- The modification code is called whenever the selection bar is moved. If two levels are collapsed and if the selection bar is positioned on the higher node, the modification codes of each level are run.
For the Table controls with breaks, the selection bar is not modified. It stays on the current element even if the break is collapsed. Managing the selection bar during expansion TableCollapseExpand does not change the position of the selection bar. Runtime speed for the TreeView Table controls The runtime speed of syntax 1 is faster than the runtime speed of syntax 2.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|