Changeset 615 for trunk/src/uigetfile_uvmat.m
- Timestamp:
- Apr 23, 2013, 4:22:08 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uigetfile_uvmat.m
r613 r615 17 17 option='browser'; 18 18 end 19 if exist(InputName,'dir') 20 InputDir=InputName; 21 InputFileName=''; 22 elseif exist(InputName,'file') 23 [InputDir,InputFileName,Ext]=fileparts(InputName); 24 if isempty(InputFileName)% if InputName is already the root 25 InputFileName=InputDir; 26 if ~isempty(strcmp (computer, {'PCWIN','PCWIN64'}))%case of Windows systems 27 InputDir=[InputDir '\'];% append '\' for a correct action of dir 28 InputFileName=[InputFileName '\']; 29 end 30 end 31 if isdir(InputName) 32 InputFileName=['+/' InputFileName Ext]; 33 end 34 else 35 InputDir=pwd;%look in the current work directory if the input file does not exist 36 InputFileName=''; 19 InputDir=pwd;%look in the current work directory if the input file does not exist 20 InputFileName='';%default 21 if ischar(InputName) 22 if exist(InputName,'dir') 23 InputDir=InputName; 24 InputFileName=''; 25 elseif exist(InputName,'file') 26 [InputDir,InputFileName,Ext]=fileparts(InputName); 27 if isempty(InputFileName)% if InputName is already the root 28 InputFileName=InputDir; 29 if ~isempty(strcmp (computer, {'PCWIN','PCWIN64'}))%case of Windows systems 30 InputDir=[InputDir '\'];% append '\' for a correct action of dir 31 InputFileName=[InputFileName '\']; 32 end 33 end 34 if isdir(InputName) 35 InputFileName=['+/' InputFileName Ext]; 36 end 37 end 37 38 end 38 39 hfig=findobj(allchild(0),'tag',option); … … 48 49 uicontrol('Style','text','Units','normalized', 'Position', [0.05 0.97 0.5 0.03],'BackgroundColor',BackgroundColor,... 49 50 'String','path:','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','left'); 50 uicontrol('Style','edit','Units','normalized', 'Position', [0.05 0.89 0.9 0.08],'tag','titlebox','Max',2,'BackgroundColor',[1 1 1],'Callback',@ refresh_GUI,...51 uicontrol('Style','edit','Units','normalized', 'Position', [0.05 0.89 0.9 0.08],'tag','titlebox','Max',2,'BackgroundColor',[1 1 1],'Callback',@titlebox_Callback,... 51 52 'String',InputDir,'FontUnits','points','FontSize',12,'FontWeight','bold'); 52 53 uicontrol('Style','pushbutton','Tag','backward','Units','normalized','Position',[0.05 0.75 0.1 0.07],... … … 86 87 end 87 88 88 89 %------------------------------------------------------------------------ 90 % --- launched by refreshing the display figure 91 function titlebox_Callback(hObject,event) 92 refresh_GUI(hObject) 93 %------------------------------------------------------------------------ 89 94 90 95 %------------------------------------------------------------------------ … … 194 199 function list_Callback(option,hObject,event) 195 200 %------------------------------------------------------------------------ 201 set(hObject,'BackgroundColor',[1 1 0])% paint list in yellow to indicate action 202 drawnow 196 203 list=get(hObject,'String'); 197 204 index=get(hObject,'Value'); … … 255 262 end 256 263 end 264 set(hObject,'BackgroundColor',[0.7 0.7 0.7])% paint list in grey to indicate action end 257 265 258 266 %-------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.