How can I hide a specific column in a virtual row tree?

How do I hide specific columns in my virtual row tree?

I tried this code:

Header.Columns.Items[3].Width := -1;


It displays the column, but not the header header. Why?


source to share

1 answer

To hide a column, exclude coVisible from the TVTColumnOption enumeration, for example

if coVisible in VST.Header.Columns[3].Options then
  VST.Header.Columns[3].Options := VST.Header.Columns[3].Options - [coVisible];


The TVirtualTreeColumn class has a MinWidth property that will overlap any column width less than MinWidth. I am currently not in a position to test this, but I don't think MinWidth will even accept a negative integer value.



All Articles