label.m

来自「为了下载东西」· M 代码 · 共 18 行

M
18
字号
%
%  Syntax:  h = label(strText,intCoords,RGBcolor)
%
%  Result:  h is a handle to a new text label that contains the text in strText and
%           is positioned at intCoords = [left,bottom,width,height].  The label's
%           BackgroundColor property has been set to RGBcolor.
%
%           Petur Snaeland, 25.04.1995.
%
function [hLabel] = label(strText,intCoords,RGBcolor);

hLabel = uicontrol('Style','text','Position',intCoords,...
                   'BackgroundColor',RGBcolor,'HorizontalAlignment','left',...
                   'String',strText);
%if (nargout==0), 
%   set(hLabel,'HandleVisibility','off');
%end;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?