Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide a column in TListview?

I am using a listview to store and show data. How can i hide and show a column in listview? Dont tell me to set the column width to 0 please!!!!

like image 812
Armin Taghavizad Avatar asked Jun 15 '11 12:06

Armin Taghavizad


1 Answers

In the Delphi TListView you can't hide columns in vsReport view style. Your only option is to delete the column when you need to hide it, and create it again when you need to show it.

This is yet another example of why virtual list views are much more desirable than non-virtual list views. With a virtual list view you can insert new columns without having to iterate across all items in the list and re-populate their sub items.

like image 155
David Heffernan Avatar answered Nov 11 '22 22:11

David Heffernan