IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
show_description.m
Go to the documentation of this file.
1 %>@ingroup misc
2 %>@file
3 %>@brief Fills editbox with description of object selected in listbox
4 
5 %> @param h_list handle for listbox
6 %> @param h_edit handle for editbox
7 function show_description(h_list, h_edit)
8 ss = {'(No object)'};
9 
10 varnames = listbox_get_selected_names(h_list);
11 if ~isempty(varnames)
12  if length(varnames) > 1
13  ss = {'(Multiple objects)'};
14  elseif length(varnames) == 1
15  varname = varnames{1};
16  var = evalin('base', varname);
17  ss = {var.get_report()};
18  end;
19 end;
20 set(h_edit, 'String', ss);
function show_description(in h_list, in h_edit)
function listbox_get_selected_names(in h_listbox)