Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - Dyncamic Layout for widgets: Page 1 of 10 (10 Items)
   
Dyncamic Layout for widgets  
How can I dynamically layout the widgets in my window?

One of the requirements of my application is for all of it's windows to be displayed full screen because the purpose of 
the app is for it to be used in a kiosk type station.  Since the target screen size is unknown at this time, I need to 
be able to move my widgets around dynamically depending upon the size of the window.

Here is what I have done so far:

1. I set the window's Pt_ARG_WINDOW_STATE to Ph_WM_STATE_ISMAX
2.I have used PhAB to group the widgets in to two separate groups.  PtGroupA and PtGroupB.  

I need to have PtGroupA always in the center (vertical and horizontal) of the window.  I need PtGroupB always in the top
 right corner.

I have read the "Widget Geometry" section of the programmers guide and I see how to set the position using the 
Pt_ARG_POS attribute, but I don't know how to determine the usable coordinates (the canvas) of the parent window so that
 I can calculate the Pt_ARG_POS value for each PtGroup.

I also saw something about setting a Layout Policy, but I didn't find too much information on this.

Is this something that can be done via settings in PhAB or is it something that I have to write the code for?

Thanks for any help.

Kendall