Domanda

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?

È stato utile?

Soluzione

Use:

VTV.Header.Columns.BeginUpdate;
try
  // Enable or Disable columns...
finally
  VTV.Header.Columns.EndUpdate;
end;

This should keep the Header.Columns in sync.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top