cancel
Showing results for 
Search instead for 
Did you mean: 

Dockable Windows: New Features Guide for SAP PowerBuilder 12.6

Former Member
0 Kudos

I copied the example in the SAP document: PowerBuilder-NewFeatures.pdf at page 21.

4.2.7

Opening Docked Windows and Tabbed Document Windows

Sample code for opening docked windows and tabbed documents.

Context

Procedure

1. Create a window w_sheet_any as a main!window type.

2. In the open event of w_sheet_any, add this code:

string ls_i

ls_i = Message.stringparm

if not isnull(ls_i) and ls_i <> "" then

this.title = ls_i

end if

3. Create an MDIDock window w_mdidock_dockstate and set any menu in it.

4. In the open event of w_mdidock_dockstate, add this code:

window win[]

OpenSheetWithParmDocked(win[1], "1", "w_sheet_any", this, WindowDockLeft!, "")

OpenSheetWithParmInTabGroup(win[2], "2", "w_sheet_any", this, "")                                             <<<<<<<<========

OpensheetWithParmInTabGroup(win[3], "3", "w_sheet_any", win[1], "")

OpenSheetWithParmAsDocument(win[4], "4", "w_sheet_any", this, "")

OpenSheetWithParmAsDocument(win[5], "5", "w_sheet_any", win[4], "")

OpenSheetWithParmAsDocument(win[6], "6", "w_sheet_any", this, "", false)

OpenSheetWithParmAsDocument(win[7], "7", "w_sheet_any", win[5], "")

OpenSheetWithParmAsDocument(win[8], "8", "w_sheet_any", win[6], "")

5. Run the application.

You will see windows 1 and 3 as a tabbed group, with the tabs at the bottom. Sheets 4, 5, and 7 appear as

tabbed doc

WHY THE SECOND OPEN DOES NOT WORK ?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi.

Even in beta the example provided needed some corrections. But instead of using the example on the pdf, why don't you take a look at the MDIDockingDemo Project included in the code examples? (See the screenshot... It's not PB.NET )

Andreas.

Former Member
0 Kudos

You are right, but after the study there is the test in the road.

Former Member
0 Kudos

That line of code actually crashes PB for me!

The problem is your second call is not specifying the correct window.  You opened a sheet in a tab group on the fame which I don't believe is valid.  Change to win[1] and you should be good.

Chris Craft