public constructor Create(...); override; destructor Destroy; override; procedure Assign(...); override; procedure Clear; virtual; function DragChange(...): Boolean; dynamic; procedure SelectAll; procedure ClearSelection; procedure SelectRange(...); function ItemByPoint(...): TListBoxItem; function ItemByIndex(...): TListBoxItem; procedure Exchange(...); procedure AddObject(...); override; procedure RemoveObject(...); override; procedure Sort(...); override; property Count: Integer ...; property Selected: TListBoxItem ...; property Items: TStrings ...; property ListItems[Index: Integer]: TListBoxItem ...; property ItemIndex: Integer ...; end; published property StyleLookup; property AllowDrag; property CanFocus; property DisableFocusEffect; property TabOrder; property AlternatingRowBackground; property Columns; property HideSelectionUnfocused; property Items; property ItemIndex; property ItemWidth; property ItemHeight; property ListStyle; property MultiSelect; property Sorted; property ShowCheckboxes; property BindingSource; property OnChange; property OnChangeCheck; property OnCompare; property OnDragChange; end; public constructor Create(...); override; property Data: TObject ...; property Index: Integer ...; published property IsChecked: Boolean ...; property IsSelected: Boolean ...; property AutoTranslate ...; property Font; property StyleLookup; property Text; property TextAlign ...; property WordWrap; end;
procedure TForm1.FormCreate(Sender: TObject); var i: Integer; begin ListBox1.Align := TAlignLayout.alLeft; ListBox1.ShowCheckboxes := True; ListBox1.AlternatingRowBackground := True; for i := to do begin ListBox1.Items.Add( + IntToStr(i)); ListBox1.ListItems[i].IsChecked := Odd(i); end; end;