on ‎2013 Dec 04 10:00 PM
Hi,
I was just wondering if there was a way that I can set it so that my DataWindows and objects move and resize relative to the application window being resized.
For example I have the following which just has a few data windows and buttons on it.
But if the user resizes the application window, the DataWindows and buttons etc stay static in their fixed position, widths and heights.
Is there a way to make the buttons move and the DataWindows resize relative to the Application Window size?
thanks.
Request clarification before answering.
If you use PFC, you should use the Resize service.
If not, just code the window resize event.
integer liMargin
liMargin = dw_1.x
// right datawindow stretch right and leave a margin
dw_2.width = newwidth - dw_2.x - liMargin
// right datawindow heighten but make room for buttons.
dw_2.height = newheight - dw_2.y - cb_1.height - liMargin * 2
dw_1.height = dw_2.height
// glue buttons to bottom
cb_1.y = newheight - cb_1.height - liMargin
cb_2.y = cb_1.y
....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lars,
I noticed everyone mention PFC. All I was able to find on this was a codeplex download. (the wiki was not overly helpful)
What is it? and are there any good getting started guides or how-tos for it? I did stumble across a PowerBuilder Foundation Class (PFC) Introductory site but it stated:
Sybase may still have documentation on the steps needed to create the PFC layer (the last known location was moved).I have not heard of it before. Is it worth doing whatever I need to do in order to make my application use it?
I might start with the window resize event as suggested by you and Terry, then go from there.
The PFC is a tightly coupled service oriented framework that has accompanied PowerBuilder since version 5. It is a bit of work converting an existing application to use PFC. You might find that you application already has a framework ( Set of ancestor classes you always inherit from and which handles frame, sheets, reminders to save before you close, maybe logical unit of works etc.)
As Neil is suggesting, you could consider re-using some of the PFC resize service for you re-sizing. In my mind, unless you have many windows with many objects it might be simpler to hand code each resize event. It depends on you proficiency too.
If you happen to have a copy of PB9, the documentation on the PFC was included in the online help file.
(have you looked here: PFC - Documentation ?)
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.