Kendall Russell
|
Dyncamic Layout for widgets
|
Kendall Russell
07/08/2011 2:12 PM
post87220
|
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
|
|
|