DockableWindows

In PowerBuilder Classic, you can set docking behaviors for the sheets that open in the MDI (multiple document interface) frame window.

  • Window Types and Docking States

    New window types allow sheets to open in one of four states: docked, floating, tabbed document or tabbed window. The new WindowTypes values are mdilock! and mdilockhelp!.

  • You can get each opened sheet's status using the enumerated type WindowDockState

    • WindowDockStateDocked!

    • WindowDockStateFloating!

    • WindowDockStateTabbedDocument!

    • WindowDockStateTabbedWindow!

  • Open Sheets in a Specific State

    New versions of the OpenSheet() allow you to open a sheet at a specific docking location, in a specific tab group, or as a document

    • OpenSheetAsDocument()

    • OpenSheetDocked()

    • OpenSheetInTabGroup()

    • OpenSheetWithParmAsDocument()

    • OpenSheetWithParmDocked()

    • OpenSheetWithParmInTabGroup()

  • Persist the MDI State

    You can set the application so that, when the user launches the application, the sheets are open in the same position and state as when the user closed it. To persist the states of opened sheets, it is important to associate a meaningful string ID with each opened sheet.

    • Set it as an argument when using the OpenSheetAsDocument(), OpenSheetWithParmAsDocument(), OpenSheetDocked(), OpenSheetWithParmDocked(), OpenSheetInTabGroup() or OpenSheetWithParmInTabGroup() function

    • Set it using the SetSheetID() function

      You can use a function to store the MDI state in the registry when the application closes. You can then use the other functions to load and open the sheets in their docking states, and present them.

    • SetSheetID() -- sets the unique identifier for an open sheet

    • SavingDockingState() -- Stores the MDI state in the registry

    • LoadDockingState() -- Loads two arrays of equal size: type names of persisted sheets and the corresponding IDs.

    • OpenSheetFromDockingState() -- Opens one or more persisted sheets within an MDI frame window for dockable windows.

    • OpenSheetWithParmFromDockingState() -- Opens one or more persisted sheets within an MDI frame window for dockable windows. This function also stores a parameter in the system's Message object so that it is accessible to the opened sheet

    • CommitDocking() -- After all persisted sheets are opened, this function arranges them and makes them visible.

  • Properties for Dockable Windows

    Customize the behavior and appearance of the windows and tabs