How to deselect a checkbox/node in a checkboxtree programmatically
Show older comments
Hi,
I am using the new prerelease of MATLAB 2022a. For my current project in App Designer I found the checkboxtree-component.
While I integrate this component in my GUI I was wondering how to deactivate checkboxes of single nodes by
code ?
There is nothing explained in the documentation.
Accepted Answer
More Answers (1)
Benjamin Thompson
on 1 Feb 2022
0 votes
Not sure whether you mean unchecking any of the checked boxes or deselecting. In the check box utiree, only one node can be selected. The uittree object has properties SelectedNodes and CheckedNotes. You just need to clear the one you want:
app.Tree.SelectedNodes = [];
app.Tree.CheckedNodes = [];
I attached an app demonstrating this.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!