Summary notes
-
The RibbonBar can be constructed by a standard XML/JSON
file. PowerBuilder provides RibbonBar Builder with preview
functionality to assist you to create the XML/JSON file. -
When you apply a RibbonBar to an application, the previous
menu in the application shall be removed. It is recommended that
you create an empty menu and assign it to the MenuName property of
the MDI window of the application. -
The ControlMenu property must be disabled for all windows in
the application, so that the Control Menu titlebar will not
display when a sheet window is maximized. -
Remember to resize the width and height for RibbonBar area
and the MDI client area after the RibbonBar is added to the MDI
window. This is to make sure the sheet windows opened in the MDI
window will display properly together with the RibbonBar. -
If some windows are inherited from an ancient window, you
can follow the same way to associate functions with the child
windows as with the ancient window.If previously some menu items with the same functionality
are placed in different sheet windows and you plan to put the menu
items in the same panel in the RibbonBar, you can consider to
control the enable/disable statuses of the RibbonBar items
depending on the active status of the sheet windows. -
The window (including MDI window) that contains the
RibbonBar control will have the Deactivate event triggered 1) when
you click the drop-down arrow to show the Ribbon menu items, or 2)
when you click the drop-down arrow to show the Ribbon panel items
(the drop-down arrow appears when the panel is resized to only
show the panel title). When the Window Deactivate event is
triggered, the control within the window will lose focus. -
The ribbon item controls have no events and must be bound
with user events. For more, see the section called “Clicked” in Objects and Controls, the section called “Selected” in Objects and Controls, the section called “Modified” in Objects and Controls, and
the section called “SelectionChanged” in Objects and Controls. -
If the RibbonBar is created by XML (or JSON), make sure 1)
this XML (or JSON) exists in the specified location at the client
when the PowerBuilder executable application is deployed and run
at the client; and 2) this XML (or JSON) is selected as “Files
preloaded in uncompressed format” when the application is deployed
with the PowerServer/PowerClient method. -
You can create a PBR (PowerBuilder resource) file to list
the resource names (such as BMP, PNG etc.) used by the RibbonBar
control and compile the PBR file with the application
executable.