www.gusucode.com > EasyKrig_V3.0工具箱matlab源码程序 > EasyKrig_V3.0/help/help_message.m
function help_message(msg,name,color,help_window_position) %% display help message global hdl [n m]=size(msg); if nargin == 1 name=''; color=[0 0 0]; help_window_position=[0.3 0.4 0.4 0.2]; elseif nargin == 2 color=[0 0 0]; help_window_position=[0.3 0.4 0.4 0.2]; elseif nargin == 3 help_window_position=[0.3 0.4 0.4 0.2]; end if ~isempty(hdl.msg.h0) figure(hdl.msg.h0); set(hdl.msg.h0,'name',name); clf; else hdl.msg.h0 = figure('Color',[0.8 0.8 0.8], ... 'Units','normalized', ... 'name',name, ... 'Position',help_window_position); end set(gcf,'menubar','none'); h1 = uicontrol('Parent',hdl.msg.h0, ... 'Units','normalized', ... 'BackgroundColor',[0.8 0.8 0.8], ... 'HorizontalAlignment','left', ... 'Position',[0.1 0.15 0.8 0.7], ... 'String',msg, ... 'fontsize',12, ... 'Style','Text'); set(h1,'foregroundcolor',color) h1 = uicontrol('Parent',hdl.msg.h0, ... 'Units','normalized', ... 'Callback','hdl.msg.h0=[];close', ... 'FontSize',8, ... 'FontWeight','bold', ... 'Position',[0.80 0.05 0.1 0.15], ... 'String','Quit', ... 'Tag','Quit');