Modernize your PowerBuilder Applications

Docking System

Docking System acts as a replacement to PowerBuilder's traditional MDI frame window. It gives users a tabbed interface to navigate between open windows. Additionally, it allows you to dock and pin commonly used functions to the top, bottom, left, or right sides of the window.

Other features include:

  • Floating document tabs.
  • Dynamically change a dock panels size and pinned\unpinned state.
  • Trigger events on the active document or all documents.
  • Use traditional MDI instead of the tabbed document interface.


Note: Any window that you open in Docking System should start off as being invisible. Please uncheck the Visible property in the IDE for all windows that will be opened in Docking System. Also, I found better success when the window I was opening was of type child.

//Resize Event of window that contains the control
//Manually size the control in the MDI frame window
uo_PowerDock.Resize(THIS.WorkSpaceWidth() - 8,
THIS.WorkSpaceHeight() - MDI_1.MicroHelpHeight - 
uo_toolbarstrip.Height + 4)

//Move event of window that contains the control    
//Notify Docking System that the window has moved

//Open Event of window that contains the control
//Set the menu that will display all open documents (and the "More Windows" window if needed)
//Open documents in the new container
uo_PowerDock.of_OpenDocument(iuo_5, "About", 'Help!')
uo_PowerDock.of_OpenDocument(iw_windowtest, "My Window", 'Window!')
//Activate a document

//Add items to the dock windows
uo_PowerDock.of_AddDockItem(uo_PowerDock.RIGHT, uo_mle1, "My Right Pane", 'ListBox!')
uo_PowerDock.of_AddDockItem(uo_PowerDock.LEFT, uo_xplistbar, "XPListBar", 'TreeView!')
uo_PowerDock.of_AddDockItem(uo_PowerDock.BOTTOM, uo_mle3, "Output", 'ListBox!')
uo_PowerDock.of_AddDockItem(uo_PowerDock.TOP, uo_mle5, "Top Pane", 'ListBox!')

//Set focus to specific dock items

//Auto dock the left dock window
uo_PowerDock.of_SetDock(uo_PowerDock.LEFT, TRUE)

//Set some initial sizes
uo_PowerDock.of_SetDockSize(uo_PowerDock.LEFT, 875)
uo_PowerDock.of_SetDockSize(uo_PowerDock.RIGHT, 875)
uo_PowerDock.of_SetDockSize(uo_PowerDock.TOP, 500)
uo_PowerDock.of_SetDockSize(uo_PowerDock.BOTTOM, 500)