Skip navigation.
Home
The QNX Community Portal

View topic - Arranging labels and pictures without using Module Tree

Arranging labels and pictures without using Module Tree

Isn't the name clear?

Arranging labels and pictures without using Module Tree

Postby coder22 » Mon Jul 19, 2010 5:53 pm

Hi
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
coder22
New Member
 
Posts: 6
Joined: Mon Jul 19, 2010 5:51 pm

RE: Arranging labels and pictures without using Module Tree

Postby perezj » Mon Jul 19, 2010 8:05 pm

PtWidgetToFront() will put whatever widget you give it in front of all others in its group.
perezj
Active Member
 
Posts: 11
Joined: Tue Jun 15, 2010 4:16 pm

RE: Arranging labels and pictures without using Module Tree

Postby coder22 » Tue Jul 20, 2010 6:15 pm

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

Thanks
coder22
New Member
 
Posts: 6
Joined: Mon Jul 19, 2010 5:51 pm

RE: Arranging labels and pictures without using Module Tree

Postby perezj » Tue Jul 20, 2010 11:18 pm

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 :)
perezj
Active Member
 
Posts: 11
Joined: Tue Jun 15, 2010 4:16 pm


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 4 guests