GUIでのファイル選択について
Mostra commenti meno recenti
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:\になるようにしたいです。
宜しくお願いします。
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su 環境と設定 in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!