TcxEditRepositoryCheckComboBox Class
A repository item that stores check combo box settings.
Declaration
TcxEditRepositoryCheckComboBox = class(
TcxEditRepositoryItem
)
Remarks
A check combo box consists of an edit box and a check list displayed in a drop-down window. Users can click check boxes in the list to select any number of items. All checked items are displayed in the edit box.
The TcxEditRepositoryCheckComboBox
class overrides the Properties property that allows you to access and customize check combo box settings.
Edit Repository Items and Standalone Editors
Edit repository items are useful when you need to share the same settings between multiple editors of the same type. To accomplish this goal, you can assign the same edit repository item to RepositoryItem properties of all target editors.
Edit Repository Items and Container Controls
A container control item (such as a toolbar edit item or a column (or any other data item) in a Data Grid, Vertical Grid, or Tree List control) can embed an in-place editor shipped with the ExpressEditors Library. An in-place editor exists (and, therefore, has its own WinAPI handle) only when the target container control item is being edited. Otherwise, the container control item displays a static editor image for resource usage optimization.
Create a Check Combo Box Repository Item at Design Time
To create a check combo box repository item at design time, double-click a TcxEditRepository component to invoke its collection editor.
The collection editor dialog allows you to manage repository items. Click the Add… button to invoke a repository item creation dialog.
Select the CheckComboBox item and click the Ok button to create a check combo box repository item.
Create a Check Combo Box Repository Item in Code
The following code example creates a check combo box repository item, defines a list of check combo box items, and assigns the created repository item to two existing unbound check combo boxes:
uses cxEdit, cxExtEditRepositoryItems;
// ...
var
ACheckComboBoxRepositoryItem: TcxEditRepositoryCheckComboBox;
ARepositoryItem: TcxEditRepositoryItem;
begin
ARepositoryItem := cxEditRepository1.CreateItem(TcxEditRepositoryCheckComboBox);
ACheckComboBoxRepositoryItem := ARepositoryItem as TcxEditRepositoryCheckComboBox;
// Populates the created repository item with check combo box items
ACheckComboBoxRepositoryItem.Properties.Items.AddCheckItem('Circle');
ACheckComboBoxRepositoryItem.Properties.Items.AddCheckItem('Rectangle');
ACheckComboBoxRepositoryItem.Properties.Items.AddCheckItem('Ellipse');
ACheckComboBoxRepositoryItem.Properties.Items.AddCheckItem('Triangle');
ACheckComboBoxRepositoryItem.Properties.Items.AddCheckItem('Square');
// Assigns the created repository item to two existing unbound check combo boxes
cxCheckComboBox1.RepositoryItem := ACheckComboBoxRepositoryItem;
cxCheckComboBox2.RepositoryItem := ACheckComboBoxRepositoryItem;
end;
Check Combo Box Repository Item Deletion
To delete all check combo box repository items in a TcxEditRepository component, call its RemoveItems procedure and pass a reference to the TcxEditRepositoryCheckComboBox
class as a parameter.
If you need to delete an individual check combo box repository item, release it directly in code (call the Free procedure in Delphi or use the delete
keyword in C++Builder).