how to remove flag in all nodes

76 visualizaciones (últimos 30 días)
Luca Re
Luca Re el 3 de Dic. de 2024 a las 10:17
Comentada: Sandeep Mishra el 3 de Dic. de 2024 a las 11:40
Hi, i've a node with more children...i want remove flag
K>> app.Tree_2
ans =
CheckBoxTree with properties:
CheckedNodes: [3×1 TreeNode]
SelectedNodes: [1×1 TreeNode]
CheckedNodesChangedFcn: ''
SelectionChangedFcn: ''
Position: [11 662.1062 220.4721 257.0796]
Show all properties

Respuesta aceptada

Sandeep Mishra
Sandeep Mishra el 3 de Dic. de 2024 a las 10:39
Hi Luca,
To implement the deselection functionality on the ‘CheckBoxTree’ component, you can use the ‘SelectedNodes’ property to dynamically manage the selection state of the nodes.
Below is a code snippet demonstrating how to deselect all the nodes:
app.Tree_2.SelectedNodes = '';
Refer to the following MathWorks Documentation to learn more about ‘SelectedNodes’ property: https://www.mathworks.com/help/releases/R2024b/matlab/ref/matlab.ui.container.checkboxtree.html#mw_b3759bc1-1118-4512-8d8a-4c51ee96beda
I hope this helps!
  7 comentarios
Luca Re
Luca Re el 3 de Dic. de 2024 a las 11:31
@Sandeep Mishra excuse me..i used word "deselect" not correctly..i want to remove flag in all children
Sandeep Mishra
Sandeep Mishra el 3 de Dic. de 2024 a las 11:40
To uncheck all the boxes in 'Tree_2' CheckBoxTree, you can use the following code:
app.Tree_2.CheckedNodes = []

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by