vcl-155089-expressbars-concepts-in-place-editors.md
The ExpressBars Suite allows you to incorporate unbound editors into toolbars and menus. It includes several built-in toolbar editors, and additionally provides a specially designed editor container bar item (TcxBarEditItem). This item can contain editors supplied by the ExpressEditors Library, as well as their descendants.
Unlike standard bar edit items, a TcxBarEditItem allows you to apply a paint style to its underlying in-place editor (font, text color, and background color).
The following image shows a bar containing three bar edit items.
There are two ways to embed ExpressEditors into toolbars:
Specify the editor type via the TcxBarEditItem properties.
Use repository items.
At design time, you can embed ExpressEditors into toolbars using the toolbar context menu. The following methods can be used:
At runtime, the editor type can be specified via the bar item’s PropertiesClass or PropertiesClassName property. You can then access the editor’s settings via the item’s Properties property.
The following example shows how to display a text editor within a TcxBarEditItem and make it read-only.
// ...
uses
cxTextEdit;
// ...
cxBarEditItem.PropertiesClassName := 'TcxTextEditProperties';
TcxTextEditProperties(cxBarEditItem.Properties).ReadOnly := True;
A TcxBarEditItem can be bound to an editor stored in an edit repository. To do this, use the RepositoryItem property.
See Also
Creating Toolbar Items and Item Controls
Customizing Popup Menu (at design time)