Machado
Machado

Reputation: 14489

How to set checked property to a custom styled TListBox?

I have a custom style for a TListBox in Delphi, where I can simply change a Text attribute like

lb_item.StylesData['location'] := 'New Text for Style';

What if I have a TCheckBox on it, how can I attribute isChecked property to true or false?

I thought it would be something that looks like

lb_item.StylesData['checkitem'] := TCheckBox.isChecked;

or maybe even

lb_item.StylesData['checkitem.isChecked'] := true;

but I can't find anything.

Any ideas on how to set a property to a custom styled TListBox?

Upvotes: 1

Views: 153

Answers (1)

Miamy
Miamy

Reputation: 2299

You should use ListBox1.ListItems[0].IsChecked := true;

Upvotes: 3

Related Questions