Author Topic: Some .add() trouble  (Read 621 times)

Well I've been using .add() to add to guis but I can't seem how to move it to the back so it doesn't overlay anything anyone know how?

Try adding it to the gui control, then set all the rest of the objects in the control invisible then visible again and it MAY appear infront of the the added object.

or you could do it properly and use .pushToBack() and .bringToFront()

or you could do it properly and use .pushToBack() and .bringToFront()
That sounds good.

You'd have to do:

%parent.add(%ctrl);
%parent.bringToFront(%ctrl);

Confusingly, bringToFront and pushToBack are for changing an object's position within another object - so pushToBack sets the object to the last child of the parent while bringToFront sets it to the first child. Therefore you'll actually need to do bringToFront to make it appear behind everything else.

Therefore you'll actually need to do bringToFront to make it appear behind everything else.
Thanks for this.