1. Yannis Theotokas
  2. PowerBuilder
  3. Monday, 20 May 2019 08:41 AM UTC

Hi to all

I am creating a new app with a docking interface. I am opening some sheets as tabs with OpenSheetAsDocument. For some sheets i don't want to open another instance of the sheet every time but instead activate it if it is already opened. How can i do that ?

Yannis Theotokas Accepted Answer Pending Moderation
  1. Wednesday, 22 May 2019 08:26 AM UTC
  2. PowerBuilder
  3. # 1

Hi Chris

Thank you for your response.

I will take a look in the STD Integrated Framework for this approach.

 

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 22 May 2019 14:56 PM UTC
Hi Yannis ... Also notice that in my framework's window tracker dialogue- that you can have two sheets active at the same time in a Dockable application. Strange, but true. Not sure though if Sybase designed it that way or its an anomaly that needs cleaning up.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 21 May 2019 18:21 PM UTC
  2. PowerBuilder
  3. # 2

Hi Yannis;

  This is an issue in the Dockable Windows style where the GetSheet() related commands do not work on Dockable, Document or TabGroup based Sheets within an MDI Dockable frame. I opened ticket # 1312 last year ( and a few others ) for this type of related issue.

   I was easily able to get around these issues in my STD Integrated Framework as it has long had a Window Manager service. I modified the service in the PB12.6 era (where the Dockable Window feature was released) to track how a main window were opened within a Dockable frame and their current state, usage, etc. Now the framework just lest the Window Manager resolve the issues like you have posed in your question above.

FYI ...

      In order to have this type of control though in a PB2017Rx dockable application, you would have to adopt something like the above approach as the native PB run-time does not allow you that much control in this type of application style.

 

Regards ... Chris

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Monday, 20 May 2019 20:07 PM UTC
  2. PowerBuilder
  3. # 3

In the SelectionChanging event of the parent/TAB object, check for the NEW tabpage to be opened.

If the NEW tabpage is one in which you want to have only a single instance, then select that tabpage ELSE open a new instance of the NEW tabpage.

 

Olan

 

Comment
  1. Yannis Theotokas
  2. Tuesday, 21 May 2019 10:10 AM UTC
Hi Olan



Thank you for your response but i was referring to dockable windows where the sheets open as tabs in the mdi frame window and not in a tab control and there is not such event as SelectionChanging
  1. Helpful
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.