Effacer les filtres
Effacer les filtres

How to control the apperance of a "ui control" from another gui?

2 vues (au cours des 30 derniers jours)
Ahmed
Ahmed le 27 Juin 2017
Commenté : Ahmed le 28 Juin 2017
Basically, I have 2 GUIs opened at the same time: GUI1 and GUI2. GUI1 includes a "Static Text" while GUI2 includes a "Push Button". I would like the Color property of the Static Text in GUI1 to change when I push the Push Button on GUI2
Please Advise

Réponse acceptée

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH le 27 Juin 2017
from gui2 : Since version R2014b :
a=findall(groot, 'Name', 'myguide1'); %myguide1 is the file name for guide1
set(findobj(a(1),'Tag','text1'),'BackgroundColor','r')%text1 is the value tag for the Static Text in GUI1
Earlier versions:
a=findall(0, 'Name', 'myguide1'); %myguide1 is the file name for guide1
set(findobj(a(1),'Tag','text1'),'BackgroundColor','r')%text1 is the value tag for the Static Text in GUI1
  2 commentaires
Walter Roberson
Walter Roberson le 28 Juin 2017
In R2014b onwards you can still use 0 instead of groot. That might not be supported eventually, but it is not marked for removal yet.
Ahmed
Ahmed le 28 Juin 2017
Thanks alot. Works fine

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by