view m-toolbox/m/gui/gltpda/g_HelpButtonCallback.m @ 41:6def6533cb16 database-connection-manager

Report authentication errors to user
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 18:04:34 +0100
parents f0afece42f48
children
line wrap: on
line source

function g_HelpButtonCallback(varargin)
   % Whenever the user click the Help button
   
   global guiFontSize

    try
      functionname = getappdata(0,'ltpda_currFunctionName');
      
      [func,classes] = strtok(get(gcbh,'Tag'));
      if strcmp(func,'method')
         helptext = help([strtrim(classes),'/',functionname]);
      else
         helptext = help(functionname);
      end
      
      helpFigure    =   figure('MenuBar','none','Toolbar','none','Name',strcat(functionname,' help'),'NumberTitle','off','Units','pixels','Position',[200,200,500,300],'Resize','on','ResizeFcn','refresh(gcf)','Color', get(0, 'defaultuicontrolbackgroundcolor'));
      % Help text:
      uicontrol('Parent',helpFigure,'Units','normalized','HorizontalAlignment','left','Position',[0 0 1 1],'FontSize',guiFontSize+1,'String',helptext,'Visible','on','max',100,'Style','edit');
   catch
      disp('Something''s wrong with the creation of the Help figure. Please check ''g_HelpButtonCallback''')
   end
end