How to get graphics array content App Designed
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Joannes Olondriz Erdozain
am 1 Feb. 2024
Beantwortet: Steven Lord
am 1 Feb. 2024
I have in a parent panel 4 push buttons and 2 children panels like this:
The number of children panels can vary, so I would like to read how many panels are. If I execute the command:
app.<Parent panel name>.Children, I get a graphics array of 6x1 (2=panels + 4=push buttons). Like this:
How can I read this cell array? Some equivalent to strcmp(ParentPanel,'Panel') to get an answer of an array like ([1 0 0 0 0 1]) and easily know with find command which members of the array are panels?
Thanks you in advance!
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Steven Lord
am 1 Feb. 2024
Rather than searching for the panels after the fact, I'd probably create a property of your app that can contain a vector of handles to the panels.
When you create a panel, store its handle in that property.
If you delete a panel, remove it from that property.
When you need to operate on the panels, get that property and select the appropriate handle or handles from the vector.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Develop Apps Using App Designer 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!