ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / TreeView functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Refreshes a TreeView control from a given position.
Note: The <TreeView>.Display function can be used on both:
  • a TreeView control based on a data file. In this case, the changes made to the linked data file are reflected in the TreeView control.
  • a TreeView control populated programmatically.
  • a single-selection or multi-selection TreeView control.
Example
// Ajout d'un élément dans un fichier de données HFSQL
FIC_Elément.Ajoute()
// Réinitialisation du champ Arbre
ARBRE_MonArbre.Affiche()
Syntax
<TreeView control>.Display([<Position>])
<TreeView control>: Control name
Name of the TreeView control to be refreshed.
<Position>: Integer, character or constant (optional)
Indicates the start position for the refresh. If this parameter is not specified:
  • For a TreeView control based on a data file, the function behaves as if the taInit constant was passed as parameter.
  • For a TreeView Table control populated programmatically, the function has no effect.
This parameter can correspond to:
  • An integer. The refresh is performed from this position. The selected row is not modified.
    For a TreeView control based on a data file, the "Display a row" event for the <Position> row is executed. The current element in the TreeView control is the same as the current record in the data file.
    For a TreeView Table control populated programmatically, the <Position> row is re-displayed.
  • A character or a constant:
    TreeView control with in-memory data sourceTreeView control populated programmatically
    taCurrentSelection
    • Re-displays the TreeView control.
    • The selected row is unchanged.
    • Re-displays the TreeView control.
    • The selected row is unchanged.
    taCurrentRecord
    • Re-runs the linked query if necessary.
    • Takes into account the records added, modified or deleted by other computers.
    • Selects the current record.
    • The scrollbar position is stored as long as the selection remains visible.
    • Runs the "Initialization" and "End of initialization" events of the control, then the "Select a row" event for the selected row (even if it is not modified).
    No effect.
    taStart
    • Refreshes the TreeView control by setting the position at the beginning of the control.
    • The first row is selected. This row corresponds to the first record.
    No effect.
    taInit
    • Runs the initialization code of the TreeView control (initialization code and end of initialization code).
    • Fills the TreeView control.
    • The first row of the TreeView control is selected. This row corresponds to the current record at the end of the initialization code of the TreeView control.
    No effect.
    taReExecuteQuery
    • Re-runs the query linked to the TreeView control.
    • Refreshes the TreeView control by setting the position at the beginning of the control.
    • The first row of the TreeView control is selected. This row corresponds to the first record.
    Warning Only the query linked to the TreeView control field is executed. If specific options have been specified with <Source>.ExecuteQuery (hModifyFile, for example), these options are ignored.
    No effect.
Business / UI classification: UI Code
Component: wd300obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/24/2024

Send a report | Local help