1,183
社区成员
发帖
与我相关
我的任务
分享
for I := 0 to ListBox1.Items.Count -1 do
begin
if ListBox1.Selected[I] then ListSelectItem := I;
ListBox1.Selected[I] := False;
end;
ListBox1.Selected[ListSelectItem] := True;
for I = 0 to ListBox1.Items.Count -1 do
if ListBox1.Selected[I] is True then ListSelectItem = I
else
ListBox1.Selected[I] = False
end if
end for
if ListSelectItem >=0 and ListSelectItem <=ListBox1.Items.Count -1
ListBox1.Selected[ListSelectItem] = True
end if