How can i use the static box in one .m to another using set(handles)?

2 views (last 30 days)
A gui was created and named as A.m
A.fig have static box and axes
A.fig can open another .fig file named as new.fig. Inside this new.fig is to import files. After importing i want to close the new.fig and set the A.m static box with a string of "1234" and the set axes will visible.
set(handles.star,'string','1234');
set(handles.axes1,'visible',on);
I added those code above in new.m file. It give error of
Reference to non-existent field 'start'.
Reference to non-existent field 'axes1'.
Do anyone can help me? How am i suppose to do to enable the static box and axes can be called in another .m file?

Accepted Answer

Jan
Jan on 1 Jun 2014
  3 Comments
Image Analyst
Image Analyst on 2 Jun 2014
Data is basically anything. The handle IDs of your controls can be considered data. You need to share the handle IDs of the controls (pushbuttons, listboxes, sliders, whatever). See the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.28s.29.3F By the way, it's harder to share between two separate GUIs than between functions contained in the same GUI or m-file.

Sign in to comment.

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!