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 / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones TreeView
  • Interrupting TreeListItem
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
Parameters of the procedure used by TreeListItem
Procedure ("Callback") called by TreeListItem for each "child" element found. This procedure can be a local, global or internal procedure.
Ejemplo
// Liste les "fils" du noeud "Desserts" dans le champ Arbre "ARBRE_RecetteTV"
// La procédure "DérouleTout" est appelée
// pour chaque "fils" trouvé du noeud "Desserts"
Res is int
Res = TreeListItem(ARBRE_RecetteTV, "Recette" + TAB + "Dessert", ArbreListeFils_DérouleTout)

//--------------------------------------------------------------------------------------------
// Procédure Interne "ArbreListeFils_DérouleTout"
// Cette procédure déroule tous les noeuds "fils" enroulés du noeud "Desserts"

INTERNAL PROCEDURE ArbreListeFils_DérouleTout(ARBRE_RecetteTV, CheminFils, FilsTrouvé, Niveau, Pointeur)
	// L'élément trouvé est-il une feuille?
	IF TreeTypeItem(ARBRE_RecetteTV, CheminFils + FilsTrouvé) = tvLeaf THEN
		RETURN // Retour à la fonction ArbreListeFils
	ELSE
		// L'élément trouvé est-il enroulé?
		IF TreeStatus(ARBRE_RecetteTV, CheminFils + FilsTrouvé) = tvCollapse THEN
			TreeExpand(ARBRE_RecetteTV, CheminFils + FilsTrouvé)
		END
	END
	// Enroule l'arbre
	TreeCollapse(ARBRE_RecetteTV, "Recette")
END
Sintaxis
TreeListItem_Callback(<TreeView control> , <Child path> , <Element> , <Level> , <Optional parameter>)
<TreeView control>: Character string
Name of the TreeView control to be used.
<Child path>: Character string
Full path of the "child" found (without the name) or an empty string ("") if it is the root of TreeView control. This parameter always ends with the "TAB" separator. This parameter will be initialized and filled whenever the procedure is called.
Remark: if the <Duplicate identifier> parameter of TreeListItem is set to True, the names of elements will contain the associated identifier if it exists. For more details, see Management of duplicates in trees.
<Element>: Character string
Name of the element found. This parameter will be initialized and filled whenever the procedure is called.
<Level>: entier
Level of element found in relation to the initial search element:
1. Direct child
2. Grand child
3. ...
<Optional parameter>: entier
Value passed in <Custom parameter> of TreeListItem. If <Custom parameter> is not specified, <Optional parameter> corresponds to the NULL constant.
Observaciones

Interrupting TreeListItem

TreeListItem cannot be interrupted as long as there are"child" elements to browse through.
To force the interruption of the browse performed by TreeListItem, use the following line in the procedure:
RETURN False
In this case, TreeListItem returns the number of elements browsed until "RESULT False" was called.
Clasificación Lógica de negocio / UI: Código neutro
Componente: wd290obj.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 26/03/2024

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