How to enable GUI1's push button using GUI2's push button?
2 views (last 30 days)
Show older comments
Good day! I would like to ask how to enable the push button (pb1) of GUI1 using the push button (pb2) of GUI2? Given that it's initially turned off using this code:
set(handles.pb1, 'Value',0,'String','-','Visible','Off'); %GUI1.m
Note that I have 2 GUI *.fig files, namely, GUI1.fig and GUI2.fig, hence their corresponding *.m files. Thank you so mmuch.
0 Comments
Answers (1)
Walter Roberson
on 19 Sep 2015
Assuming you created them as two separate GUIDE projects:
GUI2 needs to find the figure object for the first figure (somehow). Once it has it, say in fig1h, then
fig1handles = guidata(fig1h);
set(fig1handles.pb1, 'Visible','On');
0 Comments
See Also
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!