Use:
VTV.Header.Columns.BeginUpdate;
try
// Enable or Disable columns...
finally
VTV.Header.Columns.EndUpdate;
end;
This should keep the Header.Columns
in sync.
Question
I have a VirtualTreeView which has some columns initially hidden (coVisible
is not present).
After enabling them (adding coVisible
to the column Options) a strange thing happens - column appears but overlaps with previous column. I can fix the problem by changing width to 1 pixel smaller, then back to original width of the column which forces some repaint which then displays column correctly.
Is there something I need to do additionally except adding coVisible
to make the columns repaint properly?
Solution
Use:
VTV.Header.Columns.BeginUpdate;
try
// Enable or Disable columns...
finally
VTV.Header.Columns.EndUpdate;
end;
This should keep the Header.Columns
in sync.