calling a gui to return argout correctly
2 次查看(过去 30 天)
显示 更早的评论
I have a function that needs to open a gui, allow the user to select from a dropdown set of files and then hit the "OK" or "CANCEL" button.
Using R2015b GUIDE, I created a simple GUI with dropdown list and OK and CANCEL button. The code I put within the GUIDE generated function for the "OK" callback is this:
input_file_text = get(handles.CSV_File_List,'String');
input_file_value = get(handles.CSV_File_List,'Value');
input_file = input_file_text(input_file_value);
handles.output = input_file;
varargout{1} = handles.output;
uiresume
And in the OutputFCN I included the "delete(handles.Figure1)". When I call the gui like this:
[outputfile] = CSV_Name
The output I get is a statement that says: "outputfile = handle to deleted Figure". How do I get it to output the desired string?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!