procedure TForm1.ListBox1ItemClick(const Sender: TCustomListBox;
const Item: TListBoxItem);
var
i: Integer;
begin
for i := 0 to ListBox1.Count - 1 do
begin
if (ListBox1.Selected.ItemData.Detail = '') or (ListBox1.ItemIndex < 2) or
(ListBox1.ListItems[i] <> ListBox1.Selected) then
ListBox1.ListItems[i].ItemData.Accessory :=
TListBoxItemData.TAccessory.aNone
else
ListBox1.ListItems[i].ItemData.Accessory :=
TListBoxItemData.TAccessory.aCheckmark;
end;
if (ListBox1.ItemIndex < 2) or (ListBox1.Selected.ItemData.Detail = '') then
begin
ListBoxItem5.IsSelected := true;
ListBoxItem5.ItemData.Accessory := TListBoxItemData.TAccessory.aCheckmark;
end;
end;