2007年5月16日星期三

MEL笔记 3

maya master 2005中有starwar3的note中介绍了一个UNIQUE CHARACTER USER
INTERFACES,其中有个创建带分区位图界面的要求。我发现用formLayout可以满足这个要求。

拿mel的例子改一改,貌似位图要最后加载才能正常显示。


string $window = `window`;
string $form = `formLayout -numberOfDivisions 100`;
string $b1 = `button -label "b1"`;
string $b2 = `button -label "b2"`;
string $column = `columnLayout -adjustableColumn true`;
button; button; button;

setParent ..;
formLayout;
picture -image "MayaStartupImage.xpm";

formLayout -edit
-attachForm $b1 "top" 5
-attachForm $b1 "left" 5
-attachControl $b1 "bottom" 5 $b2
-attachPosition $b1 "right" 5 75

-attachNone $b2 "top"
-attachForm $b2 "left" 5
-attachForm $b2 "bottom" 5
-attachForm $b2 "right" 5

-attachForm $column "top" 5
-attachPosition $column "left" 0 75
-attachControl $column "bottom" 5 $b2
-attachForm $column "right" 5
$form;

showWindow $window;

没有评论: