value of checkboxes in uitable
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello everyone !
I created a uitable with guide. I created 2 columns : the first one with numbers and the second one with checkboxes.
I would like a function to run when checkboxes are checked, and another function to run when checkboxes are unchecked.
My problem is that I don't know how I can retrieve the value (0 or 1) of my checkboxes.
Can someone help me ?
Thanks
0 Kommentare
Akzeptierte Antwort
Adam Danz
am 26 Jul. 2019
Bearbeitet: Adam Danz
am 26 Jul. 2019
You can add a CellEditCallback function to the UITable that is evoked every time a cell in the UITable is edited. The 2nd input to this callback function contains the "Indices" field that shows you which indices of the table were just changed.
The first thing you can do in the callback function is to determine if the changed indices were a checkbox. If no, return and end the callback execution. If yes, run your function.
Feel free to follow up with any questions etc.
3 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!