How to deselect a checkbox/node in a checkboxtree programmatically
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
Weitere Antworten (1)
Benjamin Thompson
am 1 Feb. 2022
0 Stimmen
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.
1 Kommentar
DenS
am 2 Feb. 2022
Kategorien
Mehr zu Update figure-Based Apps finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!