Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
sir i have made a gui in which a push button gets images from folders of the computeers and i have a edit texts which shows the name of the image and i want to use that image for anothers pushbutton can you suggest me a way?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
[filename]=uigetfile({'*.jpg'},'File Selector');
image=strcat(filename);
axes(handles.axes1);
imshow(image);
set(handles.filename,'string',filename);
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
1 commentaire
Réponses (1)
Image Analyst
le 1 Juin 2015
Requiring users to type in the name of the file they want is not user friendly. Why don't you just load up a listbox of all the files that they might choose. See MAGIC: http://www.mathworks.com/matlabcentral/fileexchange/24224-magic-matlab-generic-imaging-component
Also read the FAQ to see how you can transfer variables between callback functions: http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.28s.29.3F
1 commentaire
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!