|
|
|
|
- Colapsar/Expandir un TreeView mediante programación
- Ejemplo
Colapsar/ampliar una control TreeView mediante programación (sintaxis de prefijo)
Colapsar/Expandir un TreeView mediante programación - Para colapsar una control TreeView a través de la programación utilice .Collapse.
- Para ampliar un TreeView mediante programación, utilice .ListItem con un Procedure local específico.
Se utilizan los siguientes códigos para: - Inicializar una control TreeView.
- expandir parte de la control TreeView.
- colapsar la control TreeView.
- Inicie el control TreeView programando:
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert", "CAKE-.BMP", "CAKE-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Ice cream")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Ice cream" + ...
TAB + "Vanilla", "NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Ice cream" + ...
TAB + "Strawberry", "NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Ice cream" + ...
TAB + "Chocolate", "NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Cup")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Cup" + ...
TAB + "Banana Split", "NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Cup" + ...
TAB + "Cherry Garcia", "NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Cup" + ...
TAB + "Colonel", "NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Apple pie")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Apple pie" + ...
TAB + "with whipped cream", "NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Apple pie" + ...
TAB + "with apple brandy", "NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Crème brûlée", "NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Meringue with cream", "NEXT5-.BMP")
- Expandir todos los elementos: El procedimiento "ExpandAll" se llama por cada "hijo" encontrado. Esta Procedure expande todos los nodos "niños" colapsados del nodo "Postre"....
Res = TREE_TVRecipe.ListItem("Recipe" + TAB+ "Dessert", "ExpandAll")
PROCÉDURE ExpandAll(TREE_TVRecipe, ChildPath, ChildFound, Level, Pointer)
IF TREE_TVRecipe.TypeItem(ChildPath + ChildFound) = tvLeaf THEN
RETURN
ELSE
IF TREE_TVRecipe.Status(ChildPath + ChildFound) = tvCollapse THEN
TREE_TVRecipe.Expand(ChildPath + ChildFound)
END
END
- Colapsar el nodo "Dessert.
Res = TREE_TVRecipe.Collapse("Recipe" + TAB + "Dessert")
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|