The documentation is lacking and I need some clarification.
AttachControl - [string, string, int, string]
Arguments are: control, edge, offset, control Valid edge values are: “top” | “bottom” | “left” | “right”. Attach a control to another control.
This is an example, please tell me why it is wrong. I have button_top that goes on top, button_mid that goes underneath button_top, and button_bottom that goes underneath button_mid.
If I wanted to have them resize vertically with the layout while residing on the right side, it should look something like…
cmds.formLayout(layout, e = 1, attachForm = [
(btn_top, "right", 0), (btn_top, "top", 0),
(btn_mid, "right", 0),
(btn_bottom, "right", 0), (btn_bottom, "bottom", 0)],
attachControl = [
(btn_top, "bottom", 0, btn_mid),
(btn_mid, "top", 0, btn_top), (btn_mid, "bottom", 0, btn_bottom)
])
Am I confusing the order for the parameters, parent control A to control B, so (controlA, “bottom”, 0, controlB) should parent the bottom of… controlA or B to the other? I don’t understand.