Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Save frame status
#4
(04-12-2022, 03:17 AM)Alexandre Machado Wrote: If you need to preserve the status of the frame, just don't destroy it. You can hide it using the visible property as you do with any control. When you need it again, just make it visible again.

Have in mind that RenderInvisibleControls of TIWForm may also affect the way you make them visible/invisible. If RenderInvisibleControls is disabled you will need a full post back (not an Async event) to make it visible again (I'm supposing that you have 2 frames in the same form).

You can also just have one on top of the other if they have the same size.

I understand.
I have a lot of frames to load and dozens of users using the webapp.
I am not sure that never destroying the frames is a good choice for memory usage.
Any advice about this?
I am going to build a frame stack for every route in application and save this stack in session. Is this a good solution or not?
Example:

Route 1:
Main Form -> (Initialize the stack) open Frame 1 (if exists in stack: visible true, else create, add to stack) -> open Frame 2 (if exists in stack: visible true, else create, add to stack) -> Open Frame 3 (if exists in stack: visible true, else create, add to stack)

Back-route 1:
Close Frame3 (visible false) -> Show Frame 2 from stack -> Close Frame 2 (Visible false) -> Show Frame 1 from stack-> Close Frame 1 (Free the entire stack)

And so on, for every route starting from main form.

Thanks,
Eddy
Reply


Messages In This Thread
Save frame status - by sonjli - 04-11-2022, 11:53 AM
RE: Save frame status - by rlebeau - 04-11-2022, 08:57 PM
RE: Save frame status - by Alexandre Machado - 04-12-2022, 03:17 AM
RE: Save frame status - by sonjli - 04-13-2022, 08:21 AM
RE: Save frame status - by sonjli - 04-19-2022, 12:18 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)