how to remove flag in all nodes

조회 수: 1 (최근 30일)
shamal
shamal 2024년 12월 3일
댓글: Sandeep Mishra 2024년 12월 3일
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

채택된 답변

Sandeep Mishra
Sandeep Mishra 2024년 12월 3일
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
shamal
shamal 2024년 12월 3일
@Sandeep Mishra excuse me..i used word "deselect" not correctly..i want to remove flag in all children
Sandeep Mishra
Sandeep Mishra 2024년 12월 3일
To uncheck all the boxes in 'Tree_2' CheckBoxTree, you can use the following code:
app.Tree_2.CheckedNodes = []

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by