Ignore:
Timestamp:
Apr 19, 2013, 8:26:15 AM (8 years ago)
Author:
sommeria
Message:

a few bugs repaired, GUI sizes optimized

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uigetfile_uvmat.m

    r612 r613  
    4848    uicontrol('Style','text','Units','normalized', 'Position', [0.05 0.97 0.5 0.03],'BackgroundColor',BackgroundColor,...
    4949            '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],...
     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,...
    5151        'String',InputDir,'FontUnits','points','FontSize',12,'FontWeight','bold');
    5252    uicontrol('Style','pushbutton','Tag','backward','Units','normalized','Position',[0.05 0.75 0.1 0.07],...
     
    9696end
    9797hfig=get(hObject,'parent');
     98hlist=findobj(hfig,'tag','list');% find the list object
     99set(hlist,'BackgroundColor',[1 1 0])
     100drawnow
    98101htitlebox=findobj(hfig,'tag','titlebox');
    99102DirName=get(htitlebox,'String');
     
    105108hcheck_date=findobj(hfig,'tag','check_date');
    106109ListFiles=list_files(DirName,get(hcheck_date,'Value'),sort_option);% list the directory content
    107 hlist=findobj(hfig,'tag','list');% find the list object
     110
    108111set(hlist,'String',ListFiles)
    109112Value=[];
     
    115118end
    116119set(hlist,'Value',Value)
    117 
     120set(hlist,'BackgroundColor',[0.7 0.7 0.7])
    118121if strcmp(get(hfig,'Tag'),'status_display')
    119122    hseries=findobj(allchild(0),'tag','series');
     
    217220    %         FullSelectName=fileparts(fileparts(FullSelectName));
    218221    %     end
     222    set(hObject,'BackgroundColor',[1 1 0])% paint list in yellow to indicate action
     223    drawnow
    219224    hbackward=findobj(hfig,'Tag','backward');
    220225    set(hbackward,'UserData',DirName); %store the current dir for future backward action
     
    225230    end
    226231    hcheck_date=findobj(hfig,'tag','check_date');
     232   
    227233    ListFiles=list_files(FullSelectName,get(hcheck_date,'Value'),sort_option);% list the directory content
    228234    set(hObject,'Value',1)
    229235    set(hObject,'String',ListFiles)
     236    set(hObject,'BackgroundColor',[0.7 0.7 0.7])
    230237    set(htitlebox,'String',FullSelectName)% record the new dir name
    231238elseif exist(FullSelectName,'file')%visualise the field if it exists
     
    288295DirName=pwd;
    289296hfig=get(hObject,'parent');
     297hlist=findobj(hfig,'tag','list');% find the list object
     298set(hlist,'BackgroundColor',[1 1 0])
     299drawnow
    290300sort_option='name';%default
    291301hsort_option=findobj(hfig,'tag','sort_option');
     
    297307htitlebox=findobj(hfig,'Tag','titlebox');
    298308set(htitlebox,'String',DirName)% record the new dir name
    299 hlist=findobj(hfig,'tag','list');% find the list object
     309set(hlist,'Value',1)
    300310set(hlist,'String',ListFiles)
     311set(hlist,'BackgroundColor',[0.7 0.7 0.7])
    301312%------------------------------------------------------------------------
    302313
Note: See TracChangeset for help on using the changeset viewer.