数学建模社区-数学中国

标题: 【奠基经典】MATLAB实用程序案例之编辑框的使用 [打印本页]

作者: 青年梦想家    时间: 2015-7-26 23:56
标题: 【奠基经典】MATLAB实用程序案例之编辑框的使用






编辑框的使用
实例

h0=figure('toolbar','none',...

'position',[200 150 350 250],...

'name','实例35');

f='Please input the letter';

huidiao1=[...

'g=upper(f);,',...

'set(h2_edit,''string'',g),',...

];

huidiao2=[...

'g=lower(f);,',...

'set(h2_edit,''string'',g),',...

];

h1_edit=uicontrol(gcf,'style','edit',...

'position',[100 200 100 50],...

'HorizontalAlignment','left',...

'string','Please input the letter',...

'callback','f=get(h1_edit,''string'');',...

'background','w',...

'max',5,...

'min',1);

h2_edit=uicontrol(gcf,'style','edit',...

'HorizontalAlignment','left',...

'position',[100 100 100 50],...

'background','w',...

'max',5,...

'min',1);

h1_button=uicontrol(gcf,'style','pushbutton',...

'string','小写变大写',...

'position',[100 45 100 20],...

'callback',huidiao1);

h2_button=uicontrol(gcf,'style','pushbutton',...

'string','大写变小写',...

'position',[100 20 100 20],...

'callback',huidiao2);



关于本帖内容欢迎大家踊跃讨论,与在下交流!






欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) Powered by Discuz! X2.5