I have a request from a user that they would like to keep the window size across sessions.
He goes to a window and initially it takes up half the workspace, so he maximizes it. Then when he logs out, logs back in and comes back to the window, it has reverted to the original half size. He is asking me to keep it maximized.
My thought is to detect when the window is maximized, write a flag to local storage. On initialize, check the local storage flag and use avPaneMaximize to maximize the window. The problem as I see it is that I don't have a way to detect when the panel has been maximized. We have the SizeChanged event, which lets me know that the size has changed, but not to what extent, i.e. maximized, minimized, etc.
Any thoughts on how I could detect when a panel has been maximized or to how to keep the panel size across sessions?
VLF-ONE Keep Window Size across Sessions
Re: VLF-ONE Keep Window Size across Sessions
#COM_OWNER.AssociatedVF_AC025O.VF_AC005Container.CurrentState should get you the current panel state as NORMAL, MINIMUM, MAXIMUM
Maybe you don’t need to know when the panel size changes so much as whether it is maximized when the panel is being closed? Then you know what to do when it is reopened again later.
In your uTerminate method you might be able to use #COM_OWNER.AssociatedVF_AC025O.VF_AC005Container.CurrentState = MAXIMUM to store a “maximize on reopening” boolean.
VLF, including VLF-ONE, has local storage abstraction called the virtual clipboard - https://docs.lansa.com/14/en/lansa048/i ... _0840.htm
Regarding maximizing on reopening, in you uInitialize method I guess, I’d be inclined to delay that on a short timer to let all the initialization stuff settle down first.
Maybe you don’t need to know when the panel size changes so much as whether it is maximized when the panel is being closed? Then you know what to do when it is reopened again later.
In your uTerminate method you might be able to use #COM_OWNER.AssociatedVF_AC025O.VF_AC005Container.CurrentState = MAXIMUM to store a “maximize on reopening” boolean.
VLF, including VLF-ONE, has local storage abstraction called the virtual clipboard - https://docs.lansa.com/14/en/lansa048/i ... _0840.htm
Regarding maximizing on reopening, in you uInitialize method I guess, I’d be inclined to delay that on a short timer to let all the initialization stuff settle down first.
Re: VLF-ONE Keep Window Size across Sessions
BTW – VLF-ONE applications by default remember and restore panel sizes.
It’s just that it does not save the panel size when the state is MAXIMUM or MINIUM.
It’s just that it does not save the panel size when the state is MAXIMUM or MINIUM.
Re: VLF-ONE Keep Window Size across Sessions
Hey Mark,
That should resolve my user's issue, if not I will look into the CurrentState property you mentioned.
Thanks,
Joe
So when its maximized it does not save the state, but if I drag the window to a specific size it does.BTW – VLF-ONE applications by default remember and restore panel sizes.
It’s just that it does not save the panel size when the state is MAXIMUM or MINIUM.
That should resolve my user's issue, if not I will look into the CurrentState property you mentioned.
Thanks,
Joe