在写mel程序时,友好的用户界面是很重要的,因此需要掌握一些基本控件的使用方法,在学习的过程中,也留给自己作为笔记,同时也希望能对有需要的人有些帮助。
1.创建一个window,里面可以包含很多的控件,比如基本的button,checkbox,textfield等等
window;
columnLayout;
text -label "My text";
button -label "I'm a button";
checkBox -label "Check Box";
radioCollection;
radioButton -label "start";
radioButton -label "stop";
floatField -value 3.41;
textField -text "Hello";
showWindow;
2.控件触发执行相应命令
global proc Create_sphere()
{
sphere -name "MySphere";
}
window;
columnLayout;
button -label "My Sphere" -command "Create_sphere()";
showWindow;
3.界面布局,有ColumnLayout,RowLayout,