views:

260

answers:

1

We currently use this logic to center every new window:

ASSIGN {&WINDOW-NAME}:X = (SESSION:WIDTH-PIXELS - {&WINDOW-NAME}:WIDTH-PIXELS) / 2 {&WINDOW-NAME}:Y = (SESSION:HEIGHT-PIXELS - {&WINDOW-NAME}:HEIGHT-PIXELS) / 2.

However, the user want to position the window in a certain place. When they close the window and reopen the window later, they want it to appear in the same place they left it.

If I remove the above code, the new window appears randomly on the screen.

Using: Windows XP Progress Openedge 10.1C01

+1  A: 

You need to record the X & Y position that the user moves it to and use that information to re-open it at that position the next time they start.

You could record the position at shutdown but that leaves the possibility of an abnormal shutdown not remembering. That might be what you want or it might not be.

Or you could detect moves and record the new position then. You'd probably want to use MOUSE-MOVE-UP.

Tom Bascom
Thanks Tom. I was hoping there was some kind of "Default Behavior" that I could activate to have Progress keep track of everything. Since that doesn't exist, I will certainly use your suggestions.
Kevin Rettig