How to make invert selection in Listview

How to make invert selection in listview? just like the invert selection
function in windows explorer?

Rgds

Shekou
shekouAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
kretzschmarConnect With a Mentor Commented:
hi shekou,

maybe this

procedure TForm1.Button1Click(Sender: TObject);
var I : Integer;
begin
  for i := 0 to listview1.Items.Count - 1 do
    listview1.Items[i].Selected := not listview1.Items[i].Selected;
end;


meikl
0
 
shekouAuthor Commented:
Thanks, it works fine.

Shekou
0
 
kretzschmarCommented:
hi shekou,

glad to helped you,
thanks for accepting my commant as answer,
good luck again

meikl ;-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.