1. ATK Gimmy Susan
  2. PowerBuilder
  3. Wednesday, 5 September 2018 13:30 PM UTC

Hi Guru.

i need to open more windows as documents, but to group them in the same group.

As you can see from the help below the last parameter indicates if i need to create a new tab group.

 

In the STD Foundation Classes framework, however, the functions 'fn_open_sheet_as_document' and 'fn_open_sheet_withparm_as_document' require the parameter to be mandatory.

Is the case expected with another function or do I have to create my own ?

 

Thanks for the reply.

 

OpenSheetWithParmAsDocument ( sheetrefvar, parameter {, windowtype }, mdiframe, sheetname {, tabalign } )

 

Argument

Description

sheetrefvar

The name of any window variable that is not an MDI frame window. OpenSheetWithParmAsDocument places a reference to the open sheet in sheetrefvar.

parameter

The parameter you want to store in the Message object when the sheet is opened. Parameter must have one of these datatypes:

  • String

  • Double

  • PowerObject

windowtype (optional)

A string whose value is the datatype of the window you want to open. The datatype of windowtype must be the same or a descendant of sheetrefvar.

mdiframe

The name of an MDI frame window.

sheetname

A unique string identifier for the sheet, which is used when layout is persisted.

tabalign (optional)

A boolean that, when used, creates a new tab group and indicates the alignment of the sheets in the group. When true, the tabs in the group align vertically. When false, the tabs align horizontally.

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 5 September 2018 14:40 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Gimmy;

  Yes, I made the arguments mandatory because you cannot overload global functions in newer versions of PB like we used to be able to do. However, you bring up a good point in that some arguments are optional in the native command.

Q:  How about I change the global functions to accept a null for the optional arguments as a compromise and then handle the variances in the global function?

   For the Tab Group though, the "document" just serves as the "parent" for the Tab Group. Once you have that window open, you would use either the "fn_open_sheet_in_tabggroup" or "fn_open_sheet_withparm_in_tabggroup" global function to add a new member to that Tab Group.

   I just noticed that the STD example App (OrderEntry) does not have an example of this technique. I will modify the example to add a Tab Group feature to show off how to use the Tab Group commands. In the meantime, I do have an example App that uses TabGroups. If you send me an email to my personal account (I believe that you have that Gimmy) - I can send you that. Its in PB2017R3 format though.

HTH

Regards ... Chris

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 5 September 2018 16:48 PM UTC
  2. PowerBuilder
  3. # 1

Hi Everyone;

    Over lunch (while watching Bruce's great webinar), I was able to modify the STD Framework's OrderEntry example application to use a Tab Group in the "customer" functionality area. Double-clicking on any customer in the "Customer list" will now open a detail DC tab in the parent window as a TabGroup. 

   I have uploaded the latest source code to the App's "beta" test area, as follows:

https://sourceforge.net/projects/stdfndclass/files/Applications/PowerBuilder/OrderEntry/Beta

Note: This version will only compile & work under PB2017R3

HTH

Regards ... Chris

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.