Skip to main content
A newer version of this page is available. .

TcxEditRepositoryItem Class

Represents a repository item.

Declaration

TcxEditRepositoryItem = class(
    TComponent,
    IdxScaleFactor
)

Remarks

A repository item maintains information specific to an appropriate editor in the Properties object. TcxEditRepositoryItem descendants redefine the Properties member allowing you to adjust attributes specific a corresponding edit control. A repository object of the TcxEditRepository class maintains a collection of repository items.

A repository item can be used to specify properties common to several editors. See the RepositoryItem property to assign a repository item to the editor. Properties of an editor assigned a repository item address the properties of the repository item. Editor properties are preserved in this case and restored when clearing the RepositoryItem value.

Repository items are also used when assigning a column type in a grid control. To make a grid control use the desired editor for a specific column, you can assign the corresponding repository item to this column. When editing data in your grid, only one instance of the editor exists. This editor is used to edit the current cell value. For other column cells editors are not created: cells are drawn with the help of the corresponding ViewInfo object, which knows how to render an editor on a canvas. The ViewInfo object is retrieved via the virtual GetViewInfoClass function of the Properties attribute.

When an editor is to be created, the editor class is determined from the Properties object of a repository item via the GetContainerClass function. After the editor is instantiated, the Properties value of the repository item is assigned to the Properties member of the edit control, thus creating an editor with the required behavior.

Implements

Inheritance

TObject
TPersistent
TComponent
TcxEditRepositoryItem
See Also