Hi,
I have a ListView that I am adding columns to using...
NB. ListColumn is a variable of type TListColumn
My understanding of AutoSize (I am fairly new to Delphi) is that this should make the column resize to the width of the text in the column. This is not the case. I'm not sure if I need to refresh the columns in some way.
If anyone can shed some light on this for me it would be much appreciated.
There are two ways to write error-free programs; only the third one works.
I have a ListView that I am adding columns to using...
Code:
for i := 0 to ADataSource.DataSet.FieldCount - 1 do
begin
ListColumn := lvSchemes.Columns.Add;
ListColumn.AutoSize := True;
ListColumn.Caption := ADataSource.DataSet.Fields[i].FieldName;
end;
NB. ListColumn is a variable of type TListColumn
My understanding of AutoSize (I am fairly new to Delphi) is that this should make the column resize to the width of the text in the column. This is not the case. I'm not sure if I need to refresh the columns in some way.
If anyone can shed some light on this for me it would be much appreciated.
There are two ways to write error-free programs; only the third one works.