GUI颜色、字体设置对话框

时间:2022-10-11 12:11:08
 %颜色设置对话框
uisetcolor %c 红色
c=uisetcolor %默认规定颜色
c=uisetcolor([ ]); %设置曲线颜色
h = plot([:]);
c = uisetcolor(h); %生成一个按钮 点击弹出改变颜色的对话框 选定颜色改变按钮的颜色
figure;
b = uicontrol('Parent',gcf,'String','颜色设置','Style','Pushbutton','Callback',...
'c = uisetcolor;set(b,''BackgroundColor'',c);') %字体设置对话框
uisetfont
clear
S=uisetfont(b)