If ColumnAppearance.Stretch is False then an EndUpdate resets the size of columns to the original width.
As sample you can drag a TAdvTreeView and two buttons to your form and add the foillowing code:
procedure TForm1.FormCreate(Sender: TObject);
begin
AdvTreeView1.ColumnsAppearance.Stretch := False;
end;procedure TForm1.Button1Click(Sender: TObject);
begin
AdvTreeView1.ExpandAll;
AdvTreeView1.AutoSizeColumn(0); // Column 0 has the right size now
end;procedure TForm1.Button2Click(Sender: TObject);
begin
AdvTreeView1.BeginUpdate;
AdvTreeView1.EndUpdate // Column size is reseted :-(
end;
Can I avoid that behaviour somehow?
After Button1Click:
After Button2Click: