Files
matlab-learning/kongjian3.m
2025-10-24 11:42:36 +08:00

11 lines
747 B
Matlab

htxt=uicontrol(gcf,"Style","text","Position",[200,125,150,25],"String","Set Window Properties");
hp=uicontrol(gcf,"Style","checkbox","Position",[200,100,150,25],"String","My Position",...
"Callback",["set(gcf,""Position"",[10,10,300,250];",...
"if get(hp,""Value"")==1,",...
"set(gcf,""Position"",[10,10,600,500]),",'end']);
hc=uicontrol(gcf,"Style","checkbox","Position",[200,75,150,25],"String","My Color",...
"Callback",["set(gcf,""color"",""w"");","if get(hc,""Value"")==1,","set(gcf,""color"",g]","end"]);
hn=uicontrol(gcf,"Style","checkbox","Position",[200,50,150,25],"String","My Name",...
"Callback",["set(gcf,""Name"",""未选择"";",...
"if get(hn,""Value"")==1,",...
"set(gcf,""Name"",""未选择"")","end");