Skip to main content

Bars

  • 2 minutes to read

Bars display various bar elements (buttons, sub-menus, embedded editors, static text, etc). There are three general types of bars: main menu, status bar and regular bars. All of them are represented by the Bar class. The main menu and status bar cannot be moved by an end-user, and they are painted using a slightly different appearance than regular bars. In addition, the main menu can be focused by pressing the ALT key.

Bars

To add any bar element to a bar, create a corresponding bar item and add it to the bar's ItemLinks collection. See the Items and Links topic, to learn about bar items.

Bars can be docked to the window, or they can be floating. To allow bars to be docked to the window, you need to add BarContainerControl objects to the window, as bars can only be docked to these containers. BarContainerControls can be created either implicitly by enabling the BarManager.CreateStandardLayout option, or manually. After bar containers have been created, a bar can be docked to the target container via the Bar.DockInfo property. See Bar Containers to learn more.

If you want to create a floating bar, set the Bar.DockInfo.ContainerType (BarDockInfo.ContainerType) property to BarContainerType.Floating. There is no need to manually create floating bar containers.

#Examples