📄 create_help_button.m
字号:
function create_help_button(funct)% Create a menu button that displays instructions found in a text file% with name ['help4',funct,'.txt'] in subdirectory "HelpFiles" in % directory S4M.myseislab%% Written by: E. R.: December 16, 2005% Last updated:%% create_help_button(funct)% INPUT% funct string with name of function that creates the plot for which the % button is intendedglobal S4M% Check if a help file existsfilename=fullfile(S4M.myseislab,'HelpFiles',['help4',funct,'.txt']);fid=fopen(filename);if fid < 0 alert(['Help file for "',funct,'" has not been found. No help button created.']) returnendlabel='Need help?';% Read help filehelp_info=get_help_file(fid);% Determine the number of sub-menus (if any)fields=fieldnames(help_info);if length(fields) == 1 % No submenus temp=getfield(help_info,fields{1}); uimenu('Label',label,'Tag','help_display', ... 'ForeGroundColor',[1 0 0],'CallBack',{@myhelpdlg,temp(2:end)});else % Submenus menu_handle=uimenu('Label',label,'Tag','help_display', ... 'ForeGroundColor',[1 0 0]); for ii=1:length(fields) temp=getfield(help_info,fields{ii}); uimenu(menu_handle,'Label',temp{1},'ForeGroundColor',[1 0 0],{@myhelpdlg,temp(2:end)}); endend%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function myhelpdlg(hObject,evdata,help_info)global S4Mhelpdlg(help_info,S4M.name)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -