on 09-19-2014 1:57 PM
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 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.