Skip to main content

TcxCustomBarEditItem.PropertiesClassName Property

Specifies the embedded editor type by its class name.

Declaration

property PropertiesClassName: string read; write;

Property Value

Type Description
string

The name of the active in-place editor properties class.

Warning

An assigned name should match the name of any existing terminal TcxCustomEditProperties class descendant; otherwise, runtime errors may occur.

We recommend that you use the PropertiesClass or RepositoryItem property to specify the required in-place editor type in code.

Remarks

A toolbar edit item can use any editor shipped with the ExpressEditors Library as an in-place editor. An in-place editor instance exists (and, therefore, has its own WinAPI handle) only when a user activates it. Otherwise, a toolbar edit item displays a static editor image for resource usage optimization.

VCL Bars: An Embedded Combo Box Example

Warning

The PropertiesClassName property is designed to store the name of the required editor settings class in a DFM file. If a name assigned to the PropertiesClassName property in code does not match an existing terminal TcxCustomEditProperties class descendant, runtime errors may occur.

Since a RAD Studio® compiler cannot verify that a correct class name is assigned to the PropertiesClassName property, we recommend that you use the PropertiesClass property or assign a configured repository item component to the RepositoryItem property to define the required in-place editor for the toolbar edit item.

Property Setter Behavior

The PropertiesClassName property setter updates Properties and PropertiesClass property values according to the selected in-place editor type.

Editor Selection at Design Time

At design time, you can use the Object Inspector to select any available in-place editor. Click a toolbar edit item’s Properties node and select the required editor from the invoked drop-down list.

VCL Bars: An In-Place Editor List in the Object Inspector

Code Example

The following code example assigns a single-line text editor with embedded buttons to the bar edit item:

// ...
uses
  cxButtonEdit;
// ...
var
  AEditProperties: TcxButtonEditProperties;
begin
  cxBarEditItem1.PropertiesClassName := 'TcxButtonEditProperties';
  AEditProperties := cxBarEditItem1.Properties as TcxButtonEditProperties;
  AEditProperties.AutoSelect := False;
  AEditProperties.MaxLength := 15;
end;

Limitations

If an editor has unbound and data-aware versions, you can embed only unbound editors into bar edit items.

Default In-Place Editor Type

The bar edit item embeds a simple single-line text editor (TcxTextEdit) if PropertiesClass, PropertiesClassName, and RepositoryItem properties are unspecified.

See Also