|
PowerDock acts as a replacement to PowerBuilder's traditional MDI frame window. It gives users a tabed
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.
Implementation:
Note: Any window that you open in PowerDock should start off as being invisible. Please uncheck the Visible property in the
IDE for all windows that will be opened in PowerDock. 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 PowerDock that the window has moved
uo_PowerDock.of_FrameMoved()
//Open Event of window that contains the control
//Set the menu that will display all open documents (and the "More Windows" window if needed)
uo_PowerDock.of_SetMenu(m_main.m_window)
//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
uo_PowerDock.of_ActivateDocument(iuo_5)
//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
uo_PowerDock.of_SetDockItemFocus(uo_xplistbar)
//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)
PowerDock
Developed by Brad Wery [TeamSybase]
brad.wery@PowerToTheBuilder.com
Usage:
Place u_cst_powerdock from advguicontrols.pbl on your MDI frame window.
Note: Any window that you open in PowerDock should start off as being invisible. Please uncheck the Visible property in the
IDE for all windows that will be opened in PowerDock. Also, I found better success when the window I was opening was of type
child.
Library List:
Add the following libraries to your application library list:
- advguicontrols.pbl
- advguiobjects.pbl
Distribution:
You will have to distribute the canvas.pbx file with your application
Functions:
of_activatedocument (userobject auo_object)
of_activatedocument (window auo_object)
of_activatedocument (long al_index)
- Brings a document to the foreground and selects the tab that it's on
of_activedocumenttriggerevent (string as_event)
- Trigger event on active document
of_adddockitem (long al_position, ref userobject auo_object, string as_text, string as_image)
- Add a dock item
- Postion should be one of the following constants: TOP, BOTTOM, LEFT, RIGHT
of_alldocumenttriggerevent (string as_event)
- Trigger event on all documents
of_closedockitem (userobject auo_object)
- Close a dock item
of_closeactivedocument ()
- Closes the active document
of_closealldocuments ()
- Close all open documents
of_closedocument (userobject auo_object)
of_closedocument (window auo_object)
of_closedocument (long al_index)
- Close a document and it's associated tab
of_getactivewindow ()
of_getactiveobject ()
- Get a pointer to the active window or userobject
of_getdockitempanel (userobject auo_object)
- Get the panel that on object resides on
of_getdocumentcollection (ref powerdockdocument pdd_documents[])
- Get a collection of all open documents
of_getdocumentcount ()
- Get a count of all the open documents
of_getdocumenttext (userobject auo_object)
of_getdocumenttext (window auo_object)
- Returns the text that's displayed in the documents tab
of_opendocument (ref userobject uo_object, string as_text, string as_image)
of_opendocument (ref window uo_object, string as_text, string as_image)
of_opendocument (ref window uo_object, powerobject apo_parm, string as_text, string as_image)
of_opendocument (ref window uo_object, string as_type, powerobject apo_parm, string as_text, string as_image)
of_opendocument (ref userobject uo_object, powerobject apo_parm, string as_text, string as_image)
- Open a document in a new tab
of_setdock (long al_panel, boolean ab_dock)
- Indicates whether a dock panel is pinned
- Postion should be one of the following constants: TOP, BOTTOM, LEFT, RIGHT
of_setdocksize (long al_position, long al_size)
- Sets a dock panels size (height or width depending on position)
- Postion should be one of the following constants: TOP, BOTTOM, LEFT, RIGHT
of_setdockitemfocus (integer al_panel, long al_index)
of_setdockitemfocus (userobject uo_object)
- Selects a dock panel item by index
of_setdocumenttext (userobject auo_object, string as_text)
of_setdocumenttext (window auo_object, string as_text)
- Changes the documents tab text
of_setmenu (menu a_menu)
- Sets the menu that will display all the open documents, pass a reference to the "Window" menu
of_settheme (long al_color)
of_settheme (string as_color)
Special Contributions:
The u_canvas object was kindly donated by Yeyi of kodigo.sourceforge.net
Download:
PBGUIControls.zip Version 2.1.2 - for PB9.0 668 KB
PBGUIControls.zip Version 2.1.2 - for PB10.5 776 KB
PBGUIControls.zip Version 2.1.2 - for PB11.1\11.2 .Net Winforms 810 KB
Special Note:
PowerBuilder 9.0
- Theme support is intermittent and a fix is being investigated.
- canvas.pbd must be distributed with your PowerBuilder 9.0 application along with the canvas.pbx file.
PowerBuilder 11.1 - .Net Winforms
- The PBCanvas.dll assembly must be added to and distributed with your application.
- There is no need to distribute canvas.pbx with your application.
- You must remove and re-add the reference to the PBCanvas.dll assembly to run the sample.
|
New This Release:
Version 2.1.2 - May 04, 2008
- General
- Support for PB11.2
- PowerDock
- Mail application frame lost focus when pane was pinned or unpinned
Version 2.1.1 (Winforms) - Apr 27, 2008
- PowerDock
- Support for Winforms deployment
Version 2.1.1 - Apr 13, 2008
- PowerDock
- Added new close and context menu for document which will display on the main windows menu
- New function to close the active document
- Hover effect on pin
- Misc. bug fixes
- Tab Control
- Added more overloads to make it easier to work with tabs that represent windows
Version 2.1.0 - Apr 06, 2008
- PowerDock
- Added many new functions to make the control more usable
- Tab Control
- Added more overloads to make it easier to work with tabs that represent windows
Version 2.0.0 - Mar 27, 2008
- PowerDock
- New this release
- Tab Control
- Added new overloads so Windows can be opened as tabs
- Toolbar
- Now supports verticle orientation
Version 1.2.1 - Feb 24, 2008
- GroupBox
- Added a new style for the groupbox
Version 1.2.0 - Feb 10, 2008
- Toolbar
- Added an overload for of_SetEnabled so items can be enabled\disabled by using an item index
- of_SetEnabled(long al_item, boolean ab_switch
- Added an overload for of_Toggle so items can be toggled on or off by using an item index
- of_Toggle(long al_item)
- Added an overload for of_AddItem so tip text can be specified
- of_AddItem(string text, string image, string tiptext)
- Added an overload for of_DisplayText so text can be displayed for a single item
- of_DisplayText(string as_item, boolean ab_display)
- Added two new functions which allow you to change the text for any item
- of_SetText(string as_item, string as_text)
- of_SetTipText(string as_item, string as_text)
- ButtonListBar
- Added a new function which allows you to change the text for any item
- of_SetText(long al_item, string as_text)
- of_SetText(string as_item, string as_text)
- Outlook 2003 ShortcutBar
- Added a new function which allows you to change the text for any item
- of_SetText(long al_item, string as_text)
- of_SetText(string as_item, string as_text)
- Added a new function which allows you to change the text for the popmenu that displays when the chevron (">>") is clicked
- of_SetMenuText(long al_item, string as_text)
- Custom Static Text
- Renamed to u_cst_statictext
Version 1.1.1 - Jan 30, 2008
- Bug fix for of_SetSize in u_cst_shortcutbar
Version 1.1.0 - Jan 27, 2008
- GroupBox
- New this release.
- Toolbar
- Added functions to toggle button
- of_Toggle(string as_item)
- of_IsToggleOn(string as_item)
- XPListBar
- Link items now have the ability to store data
- ButtonListBar
- Buttons now have the ability to store data
Version 1.0.0 - Jan 11, 2008
- Initial Release
|