Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCheckListBoxItems.Add Method

Adds a new item to the current collection.

#Declaration

Delphi
function Add: TcxCheckListBoxItem;

#Returns

Type
TcxCheckListBoxItem

#Remarks

The Add method creates a new item within the current collection. Add returns a new item object and this allows you to customize the item (set its text, state, and enabled status).

Individual items can be accessed via the Items property.

At design time you can add items by invoking the item editor for the TcxCustomCheckListBox.Items property by using the Object Inspector.

The following code adds three items for a check list box control and set their properties as appropriate:

with cxCheckListBox1.Items.Add do
  begin
    Text := 'Sources';
    Enabled := False;
    State := cbsChecked;
  end;
  with cxCheckListBox1.Items.Add do
  begin
    Text := 'Demos';
    State := cbsGrayed;
  end;
  with cxCheckListBox1.Items.Add do
  begin
    Text := 'Documentation';
  end;
See Also