ExpressBars Basics
- 4 minutes to read
All ExpressBars objects are divided into two distinct groups: visual and non-visual. The non-visual group defines the style and properties of the object. The visual group of elements represents objects on screen based on information obtained from non-visual elements. Elements in the visual and non-visual groups work together to represent the object to a user.
All objects you see within the Customization Form list (buttons, combo boxes, edit controls, etc.), describe non-visual elements called items. Items are non-visual elements that contain methods and properties of the object and process specific object events. Item defines an object’s response to mouse clicks or key press events. Properties displayed within the Object Inspector are item properties.
An item appears on screen as a control called an item control. When you drop an item onto a toolbar, an item control is created on the toolbar. In other words, an item control represents the item on the bar controls (the phrase ‘bar controls‘ refers to all controls that look like a toolbar, e.g. submenus). Item control defines only the look of an item on screen, but all processing is defined by the item. To learn more about the types of items and their controls available in the ExpressBars Suite, refer to List of Bar Item Types.
Every toolbar on screen, like other objects, is based on a non-visual bar object. This non-visual bar object includes references to all elements that appear on the toolbar. When you drop an object onto a toolbar, an item control is created on this toolbar and a link is established between the item and the item control. The non-visual bar element refers to the item via a link called the item link. The item link also defines the look of the item control on the toolbar. It contains information about the item, the bar containing this item link, and the item control itself.
One item may correspond to several item controls on different toolbars. For example, you can create one ‘Open file’ button and place it on different toolbars. If you want to place the same item on different toolbars and these corresponding item controls must look different, use an item link to customize the look of the particular item control.
The following diagram explains the role of the item link in traditional bar menus:
Use the customizing popup menu to customize the appearance of a particular item control on screen. To call the customizing popup menu, click the right mouse button on an item control.
Note
Some items may be presented on the toolbar by different item controls, that is, the way an item appears on screen depends on information from the item link, the bar control type and bar control location.
The ExpressBars Suite allows you to organize items into logical groups, using the ‘category‘ and ‘item group‘ metaphors. Grouping items allows you to easily configure item properties and to make item behavior management more convenient.
The bar manager (a TdxBarManager object) is a form component that manages items and toolbars. A ‘central storage’ contains information about all available items and all existing toolbars. Every form that uses the ExpressBars toolbars must include the bar manager. A given form may contain only a single bar manager, but within an application each form may include its own bar manager. The list of bar manager objects is stored within the dxBarManagerList object.
The diagram below describes the relationship between non-visual form objects:
The ExpressBars Suite allows you to use external dock controls. The external dock control is an addition to internal default dock controls of a bar manager. You can place the external dock control at any position on a form or panel and then embed a toolbar within it. Visually, this control appears as a rectangle on the top/bottom/right/left side of the form or floats over it.