Arranging labels and pictures without using Module Tree

I am developing a GUI without using Phab.
I have a label and a picture.
I want to set the label over the picture.
Through Phab it can be done using Module Tree.

Is there any way to set it through pure Code.

Thanks in Advance

PtWidgetToFront() will put whatever widget you give it in front of all others in its group.

Is there any way to have a sequence for them, since I have couple of pictures and 1 label.
I want to have 1 image as background. the other image is above this image. And the label will be above this image.
I used PtWidgetToBack to send the background image to back.
I used PtWidgetToFront to bring the label up.
But the other image cant be set.

Are there any other functions with which I could set them some numbers or anything by which i could fix the heirarchy with which they appear


As far as I know there isn’t a way besides using PhAB to move things around in the order, besides ToFront and ToBack. You may just have say 3 PtWidgetToFront() statements, in order: background, foreground picture, label. That way the 2 following commands would go on top of the background, the label would go on top of the foreground picture. This is how I have done my GUI.

On a sidenote, if you have a lot of the groups of foreground picture + label, and want to loop through them, it might be better to have all the labels in a group and all the pics in another group, then you can use PtWidgetBrotherInFront() to cycle to the next one. This is just in the case that you have multiple pics/labels though :slight_smile: