AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control TreeView
  • 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
How to fill a TreeView control from a data file? (prefix syntax)
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
	ARBRE_NomChampArbre.Ajoute(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
	ARBRE_NomChampArbre.Ajoute(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
	ARBRE_NomChampArbre.Ajoute(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
	ARBRE_NomChampArbre.Ajoute(Left(Client.NomCli, 1) + TAB + Client.NomCli)
END
Versión mínima requerida
  • Versión 23
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 20/09/2024

Señalar un error o enviar una sugerencia | Ayuda local