VLF-ONE Framework: Pop Up window - location & size

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
alphabeta13
Posts: 21
Joined: Tue Jan 14, 2020 12:18 am

VLF-ONE Framework: Pop Up window - location & size

Post by alphabeta13 »

Hi:

I created a pop-up window that would be showing when a push button clicked.
I set the initial location using the following routine:

Evtroutine Handling(#Customer_Audit_POPUP.Prepare) Top(#uTop) Left(#uLeft) Context(#uContext)
#uTop := 10
#uLeft := 100
Endroutine

Users are allowed to move & resize the window as they would like. When they close the window and re-open, window would be showing up at the same location set in the routine above.

Now the users would like the application to "remember" the latest location & size of the window as long as their session is still active.

Any suggestion on how to achieve this?



Thanks & Regards,
Taufik
davidbalansa
Posts: 92
Joined: Mon Feb 01, 2016 10:08 am

Re: VLF-ONE Framework: Pop Up window - location & size

Post by davidbalansa »

Hi Taufik,

You should be able to use the virtual clipboard. Here is the link to the documentation:

https://docs.lansa.com/14/en/lansa048/i ... f520000476
alphabeta13
Posts: 21
Joined: Tue Jan 14, 2020 12:18 am

Re: VLF-ONE Framework: Pop Up window - location & size

Post by alphabeta13 »

Hi David,

Thanks for responding to my question!

I tried adding the command in the PopUp Window source:
Invoke #AvFrameworkManager.avRestoreValue WithID1(LeftPosition) ToAValue(#uLeft)

I got error message:
Name AVFRAMEWORKMANAGER could not be found

If I added the command in the command handler that's having the push button (the one that initiate the pop-up window), a different error message is showing: Name ULEFT could not be found.


Is there anything that I was doing incorrectly?

Thanks,
Taufik
User avatar
Dino
Posts: 472
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: VLF-ONE Framework: Pop Up window - location & size

Post by Dino »

How is defined the pop_up component in the BEGIN_COM line? what is the class?
if the class is not a #VF_* class, then you wont have access to use the VF virtual clipboard inside the pop up.
But you can do that in the component that calls the pop_up.

For example, if the user change the window size, or maybe, when it closes the pop_up you can trigger an event, for example Pop_up_closed and the previous component that is using it, can have an EVTROUTINE for that event and do the AVSAVEVALUE there.

In the same way, when you are going to call the popup, you first do the AVRESTOREVALUE in your component that extend VF_* then show the pop_up and send those values to it.
Post Reply