DELPHI中的ListView用法 delphi 关于listview控件的问题?
DELPHI中的ListView用法
var
GlobalVal: array[0..99] of Integer
i: Integer
begin
for I := Low(GlobalVal) to High(GlobalVal) do
begin
with ListView1.Items.Add do
begin
GlobalVal[i] := i 100
Caption := IntToStr(i)
SubItems.Add(IntToStr(GlobalVal[i]))
end
end
end
delphi 关于listview控件的问题?
在Listview的OnClick事件里添加代码begin if ListView1.Selected = nil then Exit Case ListView1.Selected.Index of 0: begin // end 1: begin end ... endend将RowSelect设为True,MultiSelect设为False