![]() |
|
|
|
|
#1
|
|||
|
|||
|
Индекс выбранная строки здесь - ListBox.ItemIndex.
Это если ListBox.ItemIndex = -1 - строка не выбрана. Проверка на кол-во елементов ListBox.Count = 0. Код:
var Index : integer; begin if ListBox.Count = 0 then Exit; Index := ListBox.ItemIndex; if Index < 0 then Exit; ListBox.Items[Index].Do_Miracle; // or whatever you want. end; |