Show TOC

Opening Docked Windows and Tabbed Document WindowsLocate this document in the navigation structure

Sample code for opening docked windows and tabbed documents.

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 documents together, as do 6 and 8, both groups with tabs at the top. Window 2 is alone and untabbed.