Changeset 363 for trunk/src/fill_GUI.m
- Timestamp:
- Jan 10, 2012, 9:13:31 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/fill_GUI.m
r361 r363 17 17 else 18 18 hh=[]; 19 input_data=Param.(fields{ifield}); 19 20 if isfield(handles,fields{ifield}) 20 21 hh=handles.(fields{ifield}); 21 22 if strcmp(get(hh,'Type'),'uitable') 22 set(hh,'Data',input )23 set(hh,'Data',input_data) 23 24 break 24 25 end 25 elseif isnumeric(input ) && isfield(handles,['num_' fields{ifield}])26 elseif isnumeric(input_data) && isfield(handles,['num_' fields{ifield}]) 26 27 hh=handles.(['num_' fields{ifield}]); 27 28 end 28 29 if ~isempty(hh) 29 30 set(hh,'Visible','on') 31 get(hh,'style') 32 input_data 30 33 switch get(hh,'style') 31 case {'checkbox',' pushbutton','radiobutton','togglebutton'}32 if isnumeric(input )33 set(hh,'Value',input )34 case {'checkbox','radiobutton','togglebutton'} 35 if isnumeric(input_data) 36 set(hh,'Value',input_data) 34 37 end 35 38 case 'edit' 36 if isnumeric(input )37 input =num2str(input);39 if isnumeric(input_data) 40 input_data=num2str(input_data); 38 41 end 39 set(hh,'String',input )42 set(hh,'String',input_data) 40 43 case{'Listbox','popupmenu'} 41 if isnumeric(input )42 input =num2str(input);44 if isnumeric(input_data) 45 input_data=num2str(input_data); 43 46 end 44 47 menu=get(hh,'String'); 45 iline=find(strcmp(input ,menu));48 iline=find(strcmp(input_data,menu)); 46 49 if isempty(iline) 47 50 iline=numel(menu)+1; 48 set(hh,'String',[menu;{input }])51 set(hh,'String',[menu;{input_data}]) 49 52 end 50 53 set(hh,'Value',iline)
Note: See TracChangeset
for help on using the changeset viewer.