function [] = GUI_pop_to_list()
S.fh = figure('units','pixels',...
'position',[450 450 400 150],...
'menubar','none',...
'resize','off',...
'numbertitle','off',...
'name','GUI_pop_to_list');
S.pp = uicontrol('style','pop',...
'units','pix',...
'position',[10 60 190 40],...
'string',{'Data 1';'Data 2';'Data3'},...
'fontweight','bold',...
'horizontalalign','center',...
'fontsize',11);
S.ls = uicontrol('style','list',...
'units','pix',...
'position',[210 70 190 60],...
'backgroundcolor','w',...
'HorizontalAlign','left');
S.pb = uicontrol('style','push',...
'units','pix',...
'position',[10 10 380 40],...
'HorizontalAlign','left',...
'string','Transfer',...
'fontsize',14,'fontweight','bold',...
'callback',{@pb_call,S});
uicontrol(S.pp)
function [] = pb_call(varargin)
S = varargin{3};
E = get(S.pp,{'string','value'});
STR = get(S.ls,'string');
set(S.ls,'string',[STR;E{1}(E{2})])
Best Answer