How to Export a Toolbar From a Child Form to a Main Form
This topic explains how to copy toolbars from a bar manager located on child forms to the bar manager within the main form.
To create toolbars on a child form and then integrate them onto the main form, you must use the TdxBarManager.Merge method as shown below:
// ...
// set the second parameter to True to create new toolbars in the
// main form, if the bar captions of the main and child forms do
// not match
MaindxBarManager.Merge(ChilddxBarManager, True);
Note
You can omit passing the second parameter (which is True by default).
To “detach” toolbars, use the TdxBarManager.Unmerge method as shown below.
Note
We recommend that you use a bar manager on the main form when merging/unmerging toolbars. This allows you to dynamically change, display, and hide toolbars and menu items when a specific application window is displayed.
See Also