f=figure;
b=uicontrol('Parent',f,'Style','Pushbutton','String','颜色设置',...
'Callback','c=uisetcolor();if length(c)==1 else set(b,''BackgroundColor'',c); end;');
% uisetcolor() 颜色对话框。 set(b,''BackgroundColor'',c) 设置按钮背景颜色
Matlab GUI,颜色对话框,设置按钮背景颜色
最新推荐文章于 2024-06-24 20:15:51 发布