|
|
|
|
- Presentación
- Ejemplos
- Ejemplo 1
- Ejemplo 2
- Ejemplo 3
¿Cómo llenar un control TreeView usando un archivo de datos?
Por Default, el control TreeView no puede mostrar automáticamente los datos procedentes del un archivo de datos. Veamos algunos ejemplos utilizados para realizar esta operación. Este algoritmo se utiliza para rellenar un Treeview control a partir de un archivo de datos:
// Browsing the data file HReadFirst(FileName, KeyName) WHILE HOut() = False // Add to the TreeView control TreeAdd(TREE_TreeViewControlName, MyRoot + TAB + Branch + TAB + Leaf) HReadNext(FileName, KeyName) END
Ejemplo 1 // Browsing the data file HReadFirst(Company, City) WHILE HOut() = False // Add to the TreeView control TreeAdd(TREE_TreeViewControlName, Company.City + TAB + Company.CompanyName) HReadNext(Company, City) END
Ejemplo 2 // Browsing the data file HReadFirst(Customer, CustName) WHILE HOut() = False // Add to the TreeView control TreeAdd(TREE_TreeViewControlName, Left(Customer.CustName, 1) + TAB + Customer.CustName) HReadNext(Customer, CustName) END
Ejemplo 3 // Browsing the data file FOR EACH Customer ON CustName // Add to the TreeView control TreeAdd(TREE_TreeViewControlName, Left(Customer.CustName, 1) + TAB + Customer.CustName) END
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|