Good morning,
strange situation with grid.autosizecolums.
Grid with 20 columns, the last one can have a medium large text (maybe 60 chars, font Tahoma, size 10, normal).
I try to adapt the column width using grid.autosizecolums(true); for all columns it's ok but the last one does not fit correctly the text (ant is will truncate) and the maximum column width is setted as 989 (readed on grid.ColWidths). Even if i set it to 1500, after called autosizecolumns, the col width return to 989 (screen resolution 1920 x 1080).
The same if i use grid.widecells and/or grid.autogrowcolumns(true), no way to allow full text display.
There's any setting i missed or where i make an error ??
thank's for all
Daniele
PS: the grid data is loaded by loadfromstream here piece of code (SG2 and SG3 are TAdvStringGrid)
SG3.StartUpdate;
SG2.StartUpdate;
SG2.UnHideColumns(11,15); // To be sure to save all grid
SG3.RemoveRows(1,SG3.LastRow); // remove all rows
MS:=TMemoryStream.Create;
MS.Seek(0,soFromBeginning);
SG2.SaveToStream(MS);
MS.Seek(0,soFromBeginning);
SG3.LoadFromStream(MS);
FreeAndNil(MS);
SG3.ColCount:=18; // Add a new column to woriking grid
SG3.Cells[18,0]:='GRUPPO'; // Named it
SG3.EndUpdate;
LoadGroup; // check and load the product group, if any
SG3.AutoSizeColumns(True);
Did you set any specific setting like grid.ColumnSize.Stretch? Or other grid.ColumnSize.* properties? How exactly can this be reproduced?
Hi Bruno,
are some days who i check this and it's no more happend.
I'll inform here if, for any reason, it return.
Thank's for all
Daniele