1. Steven Weingold
  2. PowerBuilder
  3. Tuesday, 12 March 2019 18:03 PM UTC

I implemented the SaveDockingState(regkey) function in a new PB2017 application to save the state of all docked / pinned windows and then use the LoadDockingState(), OpenSheetFromDockingState() & CommitDocking() functions to restore them. 

This functionality works fine for one or two windows open on exit. However, if a third window is open; the App closes;  and then reopens, only two of the three windows that were open are restored. This behavior is consistent and have not once seen all three windows restore on open.

 

Thanks,

Steve

 

 

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 13 March 2019 20:37 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Steven;

  I have this feature working in my framework. You can see it in action in the latest (beta) example OrderEntry application which can be downloaded from here:  https://sourceforge.net/projects/stdfndclass/files/Applications/PowerBuilder/OrderEntry/Beta/PB2017R3

  The OE App can easily save & restore 4-8 dockable windows (tested - but, probably more). The framework creates the following registry entries (which is customizable) ...

  You can see the implementation code in the "wn_controller_master" object class's "oe_postopen" and "CloseQuery" events. The reason why the Dockable State is captured in the CloseQuery, is that this is the safe place to capture the open sheets. The framework has a "Sheet Manager" that closes all the open sheets (in reverse open order) before the Frame closes to make sure the App "shutdown" is smooth & orderly.

  When you run the OE app, just select the "Dockable" check box in the "login" dialogue to enter Dockable mode. Otherwise, it will run as a plain MDI frame based App. I still have some code "tweeks" to do but for the most part, its working well (for me).

  Here is an example start-up of the OE app that restores 5 dockable sheets ....

HTH

Regards ... Chris

 

 

 

Comment
There are no comments made yet.
Steven Weingold Accepted Answer Pending Moderation
  1. Friday, 15 March 2019 14:50 PM UTC
  2. PowerBuilder
  3. # 1

Great! Thanks, Chris.

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 13 March 2019 14:53 PM UTC
  2. PowerBuilder
  3. # 2

You should report it as a bug.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.