ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Developing an application or website / Controls, windows and pages / Controls: Available types / TreeView control
  • Overview
  • Examples
  • Example 1
  • Example 2
  • Example 3
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Overview
WINDEV Data binding is available for Arbre fields: the field can be linked directly to a data file or a variable.. For more details, see TreeView control linked to a variable or data file.
By default, the TreeView control cannot automatically display the data coming from a data file.
Let's see some examples used to perform this operation.
This algorithm is used to populate a Treeview control from a data file:
// Parcours du fichier de données
HReadFirst(NomFichier, NomClé)
WHILE HOut() = False
	// Ajout dans le champ Arbre
	TreeAdd(ARBRE_NomChampArbre, MaRacine + TAB + Branche + TAB + Feuille)
	HReadNext(NomFichier, NomClé)
END
Examples

Example 1

// Parcours du fichier de données
HReadFirst(Societe, Ville)
WHILE HOut() = False
	// Ajout dans le champ Arbre
	TreeAdd(ARBRE_NomChampArbre, Societe.Ville + TAB + Societe.NomSoc)
	HReadNext(Societe, Ville)
END

Example 2

// Parcours du fichier de données
HReadFirst(Client, NomCli)
WHILE HOut() = False
	// Ajout dans le champ Arbre
	TreeAdd(ARBRE_NomChampArbre, Left(Client.NomCli, 1) + TAB + Client.NomCli)
	HReadNext(Client, NomCli)
END

Example 3

// Parcours du fichier de données
FOR EACH Client ON NomCli
	// Ajout dans le champ Arbre
	TreeAdd(ARBRE_NomChampArbre, Left(Client.NomCli, 1) + TAB + Client.NomCli)
END
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 09/21/2024

Send a report | Local help