esk
asked on
Select All in listview
how can i select all in listview with one click
ASKER
i want to push a button, after that it selects all in this listview
ASKER
this is like multiselect , but i push a button and it select self all item
Simple, but does what you asked for...
procedure TForm1.Button1Click(Sender : TObject);
var
TmpI : Integer;
begin
For TmpI:=0 to ListBox1.Items.Count-1 do
ListBox1.Selected[TmpI]:=T rue;
end;
Hope this helps,
John.
procedure TForm1.Button1Click(Sender
var
TmpI : Integer;
begin
For TmpI:=0 to ListBox1.Items.Count-1 do
ListBox1.Selected[TmpI]:=T
end;
Hope this helps,
John.
Doh!!! Sorry.....You said listview, not listbox....
For TmpI:=0 to ListView1.Items.Count-1 do
ListView1.Items[TmpI].Sele cted:=True ;
ListView1.SetFocus;
That'll do the trick!
John.
For TmpI:=0 to ListView1.Items.Count-1 do
ListView1.Items[TmpI].Sele
ListView1.SetFocus;
That'll do the trick!
John.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
p.s. Make sure you set the MultiSelect property of your TListView to TRUE else it won't work
The Neil
The Neil
Ha! (Forgot to mention MultiSelect though!)
John.
John.
ASKER
work!!!
Thanks Esk,
Sorry John - looks like I won this time
The Neil
Sorry John - looks like I won this time
The Neil
This is pathetic. I'm getting pissed off with you so called Experts.
Who answered you first?
The Neil