AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control TreeView
  • Presentación
  • Ejemplos
  • Example 1
  • Example 2
  • Example 3
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
¿Cómo rellenar un control TreeView a partir de un archivo de datos? (sintaxis con prefijo)
Presentación
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:
// Browsing the data file
HReadFirst(FileName, KeyName)
WHILE HOut() = False
	// Add to the TreeView control
	TREE_TreeViewControlName.Add(MyRoot + TAB + Branch + TAB + Leaf)
	HReadNext(FileName, KeyName)
END
Ejemplos

Example 1

// Browsing the data file
HReadFirst(Company, City)
WHILE HOut() = False
	// Add to the TreeView control
	TREE_TreeViewControlName.Add(Company.City + TAB + Company.CompanyName)
	HReadNext(Company, City)
END

Example 2

// Browsing the data file
HReadFirst(Customer, CustName)
WHILE HOut() = False
	// Add to the TreeView control
	TREE_TreeViewControlName.Add(Left(Customer.CustName, 1) + TAB + Customer.CustName)
	HReadNext(Customer, CustName)
END

Example 3

// Browsing the data file
FOR EACH Customer ON CustName
	// Add to the TreeView control
	TREE_TreeViewControlName.Add(Left(Customer.CustName, 1) + TAB + Customer.CustName)
END
Versión mínima requerida
  • Versión 23
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 21/09/2024

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