GUI颜色、字体设置对话框

 1 %颜色设置对话框
 2 uisetcolor
 3 
 4 %c 1 0 0 红色
 5 c=uisetcolor
 6 
 7 %默认规定颜色
 8 c=uisetcolor([1 0 0 ]);
 9 
10 %设置曲线颜色
11 h = plot([0:10]);
12 c = uisetcolor(h);
13 
14 %生成一个按钮 点击弹出改变颜色的对话框 选定颜色改变按钮的颜色
15 figure;
16 b = uicontrol('Parent',gcf,'String','颜色设置','Style','Pushbutton','Callback',...
17     'c = uisetcolor;set(b,''BackgroundColor'',c);')
18 
19 %字体设置对话框
20 uisetfont 
21 clear
22 S=uisetfont(b)

 

posted @ 2018-01-06 20:16  wydxry  阅读(1260)  评论(0编辑  收藏  举报
Live2D