Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.

// ...
  MaindxBarManager.Unmerge(ChilddxBarManager);

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