MATLAB: How to put pictures in a GUI that opens from the main GUI!
guiguideimageMATLAB
Hello! I created a GUI with buttons that call other side GUI, each with different information. But I still fail to put images in these windows, and need multiple images to better explain the content.
Please help me!
Best Answer
Valarie - your line of code
open('help01.fig');
just opens or displays the figure corresponding to the GUI but does not perform any of the initializations that would occur when launching the GUI correctly. Replace this callback with just
function pushbutton16_Callback(hObject, eventdata, handles)
help01;
to launch the GUI when pressing this pushbutton 16. Note also, that if you want to show the image when the help GUI launches, you must put that command in theOpeningFcn of your GUI (not the pushbutton 5 unless you intend the image to load when the user presses this button).
You need to put a static text label on your GUI with a tag of txtValue (or whatever you want). Then in each callback where you want to change handles.value you need to have this:
handles.value = handles.value + 80; % Or whatever value you want.
handles.txtValue.String = sprintf('The Value now = %.1f', handle.value);
% Update handles structure
guidata(hObject, handles); % Not calling this was your problem.
Best Answer