How can I add a control to the top of a UI layout instead of the bottom (as is the default)?
You have two options:
-
Use a formLayout and re-attach the controls as you add each to the layout:
formLayout myForm;
text1;
text2;
text3;
formLayout -e
-attachForm text1 top 4
-attachControl text2 top 4 text1
-attachControl text3 top 4 text2
myForm;
setParent myForm;
text4;
formLayout -e
-attachForm text4 top 4
-attachControl text1 top 4 text4
myForm;
-
Delete all children of the layout and re-add in the desired order:
columnLayout myColumn;
text1;
text2;
text3;
string $children[] = `columnLayout -q -childArray myColumn`;
for ( $child in $children )
deleteUI $child;
setParent myColumn;
text4;
text1;
text2;
text3;
|