GUIでのファイル選択について
Show older comments
GUIでファイルを選択する時に、2回目以降は前回開いたファイルパスのところを開くにはどのようにすればできますか?
下はコードの一部です
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[FileName1,PathName1] = uigetfile( ...
{ '*.*', '全てのファイル (*.*)'}, ...
'Pick a file','MultiSelect', 'on','C:\');
Bagsheet1 = strcat(PathName1,FileName1);
assignin('base', 'Bsheet1', Bsheet1);
set(handles.edit1,'String',Bsheet1);
1回目の時はC:\のファイル画面が開かれますが、これだと2回目以降も同じになります。
例えば1回目のファイル選択でC:\の開かれたファイルからD:\のファイルで選択した時、2回目のファイル選択画面をD:\になるようにしたいです。
宜しくお願いします。
Accepted Answer
More Answers (0)
Categories
Find more on 環境と設定 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!