Hot to change the settings of multiple gui components at the same time
Mostra commenti meno recenti
Hello,
I have a programmatically written gui. Their units are in pixels. After writing everything in pixels, I wanted to set all the units to normalized. I don't want to do it one by one. Do you know how I can set to normalized for multiple handles at the same time?
Thank you,
Emre
Risposta accettata
Più risposte (2)
Matt Fig
il 10 Ago 2012
Pass in a vector of the handles:
u(1) = uicontrol;
u(2) = uicontrol;
u(3) = uicontrol;
set(u,'units','norm')
5 Commenti
Seyhan Emre Gorucu
il 10 Ago 2012
Matt Fig
il 10 Ago 2012
In that case, something like this would be easiest of all!
set(findall(gcf,'units','pix'),'units','norm')
Seyhan Emre Gorucu
il 10 Ago 2012
Addy
il 9 Mag 2018
In that case, something like this would be easiest of all!
set(findall(gcf,'units','pix'),'units','norm')
OMG. Thank you very much for this. I finally found this gold after 5 hours of madness :^)
Kevin Phung
il 25 Mar 2019
Modificato: Kevin Phung
il 25 Mar 2019
ditto that!! That's one beautiful line. Thanks @Loginatorist
Seyhan Emre Gorucu
il 10 Ago 2012
0 voti
Categorie
Scopri di più su Programming in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!