|
|
|
|
|
- Overview
- Examples
- Example 1
- Example 2
- Example 3
How to populate a TreeView control using a 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:
HReadFirst(NomFichier, NomClé)
WHILE HOut() = False
TreeAdd(ARBRE_NomChampArbre, MaRacine + TAB + Branche + TAB + Feuille)
HReadNext(NomFichier, NomClé)
END
Example 1
HReadFirst(Societe, Ville)
WHILE HOut() = False
TreeAdd(ARBRE_NomChampArbre, Societe.Ville + TAB + Societe.NomSoc)
HReadNext(Societe, Ville)
END
Example 2
HReadFirst(Client, NomCli)
WHILE HOut() = False
TreeAdd(ARBRE_NomChampArbre, Left(Client.NomCli, 1) + TAB + Client.NomCli)
HReadNext(Client, NomCli)
END
Example 3
FOR EACH Client ON NomCli
TreeAdd(ARBRE_NomChampArbre, Left(Client.NomCli, 1) + TAB + Client.NomCli)
END
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|