Mercurial > hg > ltpda
comparison m-toolbox/m/gui/gltpda/g_HelpButtonCallback.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 function g_HelpButtonCallback(varargin) | |
2 % Whenever the user click the Help button | |
3 | |
4 global guiFontSize | |
5 | |
6 try | |
7 functionname = getappdata(0,'ltpda_currFunctionName'); | |
8 | |
9 [func,classes] = strtok(get(gcbh,'Tag')); | |
10 if strcmp(func,'method') | |
11 helptext = help([strtrim(classes),'/',functionname]); | |
12 else | |
13 helptext = help(functionname); | |
14 end | |
15 | |
16 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')); | |
17 % Help text: | |
18 uicontrol('Parent',helpFigure,'Units','normalized','HorizontalAlignment','left','Position',[0 0 1 1],'FontSize',guiFontSize+1,'String',helptext,'Visible','on','max',100,'Style','edit'); | |
19 catch | |
20 disp('Something''s wrong with the creation of the Help figure. Please check ''g_HelpButtonCallback''') | |
21 end | |
22 end |