Question

I'm working on an upgrade of a legacy app with multiple UOs and DWs all contained within 1 window.

Our clients are getting monitor upgrades (19" monitors!!! modern resolutions!!) and most of them will be 1280x1024, but there are still a few stations that are using the old 1024x768 resolutions while some executives get to use their fancy laptops with a 1366x768 resolution.

I've been trying to make our interface as responsive as possible but I still have to hardcore fixed values for every single uo and dw.

I'm trying to work it down to where I can simply use something like dw.height = env.height - dw.x-position.

Is this possible?

Currently I use something like this

// height = base height - details ( - buttons)
w_cms.uo_pat.uo_pat_appt.tab_1.tab_os_aptinfo.dw_os_aptinfo.Height  = G_uo_height - 420
w_cms.uo_pat.uo_aps_book.uo_aps_cal.dw_free_slot.height = ll_base - 1230
Was it helpful?

Solution

To get the true position, you have to go up the chain of parent objects and add all their coordinates together.

A better approach to this problem is to resize your controls to the size of the window, not just the size of the screen. Not only is this easier, but it also means your application is responsive to window resizings, not just resolution differences. (This also dodges issues with varying sizes of chrome, like task bar size, scroll bar size, window border size, etc...)

The PFC has resize services for windows and DataWindows that do this, and the downloads have documentation on how these functions are used. There used to be articles on how to decouple PFC code and use it with a non-PFC architecture, but as long as you have ancestors for all your windows and DataWindow controls, it's not rocket science.

Good luck,

Terry.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top