function initbuttons(tit, bstring, addcbk) %INITBUTTONS Inizialize the uicontrol in the control frame % % Copyright (c) 1995 by Claudio Rivetti and Mark Young % claudio@alice.uoregon.edu, mark@alice.uoregon.edu % global Uibgcolor B_frame Handlefig if nargin==0, tit='';end if nargin<3, addcbk='';end titcolor='b'; pos=get(B_frame, 'Position'); closebuttons; set(B_frame, 'visible', 'on'); cbk=[ addcbk 'set(B_frame, ''visible'', ''off'');closebuttons;']; uicontrol(gcf, 'Style', 'text',... 'String', tit,... 'Units', 'normalized',... 'Position', [pos(1)+0.002 pos(2)+pos(4)-0.04 pos(3)-0.004, 0.03],... 'ForegroundColor', titcolor,... 'BackgroundColor', Uibgcolor); if nargin >1 uicontrol(gcf, 'Style', 'push', ... 'String', bstring, ... 'Interruptible','on',... 'tag', 'BDONE',... 'Units', 'normalized', ... 'Position', [pos(1)+(pos(3)-0.12)/2 pos(2)+0.02 0.12 0.04], ... 'CallBack', cbk); end return