필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
Ahmed
Ahmed 2017년 6월 27일
댓글: Ahmed 2017년 6월 28일
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

채택된 답변

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2017년 6월 27일
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
Walter Roberson
Walter Roberson 2017년 6월 28일
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 2017년 6월 28일
Thanks alot. Works fine

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by