TAdvStringGrid AtuoSizeColumns strange behaviour

Good morning to all,
i'm using AdvStringGrid from years and i never had this strange problem !!
Case:
I have a AdvStringGrid placed into a panel, the grid is aligned to client (fit all the panel).
4 Columns, last one keep the full file path.
After the grid is populated i call AutoSizeColumns(True) in order to arrange all the columns width with the text length (in pixel).
Now, very very strange, last column (that keep a very long string about 150-180 chars) is resized not with text length (in pixel) but is resized in order to fitt the client (panel) width and, as a result, the text is cut (the string is partialy displaied).
I tried, also, with AutoGrowColums with no better result (no chage in result).
Is very possible who i miss some setting ....

Thank's for the attention
Best regards
Daniele

PS: Exactly which is the difference between autosizecolumns and autogrowcolumns ?

Please check if under grid.ColumnSize, you enabled Stretch?

Hi Bruno,
Grid..ColumnSize is set to False.
But, to be honest, i tried to do a couple of test and in all of them the grid works as expected.
Seem that the problem is isolated into the form in my project (wher i use the Bass library, this is the only difference with other form).
I'll rewrite the code in order to understand where the problem is !!

Thank's for your help.

Best regards
Daniele

Hi Bruno,
with this project (Windows 10 pro, delphi 10.3.2 / 10.4, last release TMS VCL UI 10.5.7.1) i get the problem i wrote before:

GridAutosize_2021-06-21.zip (7.6 KB)

Can you run this project and verify if you can reproduce? (the problem is showed when i choose a file like C:\Windows\appcompat\UA\classicon_{36fc9e60-c465-11cf-8056-444553540000}.png)

Thank's for your attention

Best regards
Daniele

I tested this here and I get:

Hi Bruno,
thank's for you reply.
Can you try to run the demo with the smoller form size?
When the grid has a size greater then the form (or it's prent conteiner like panel) the component draws the grid to fill that space. When i scroll the grid in order to show the other columns, the grid scroll (for example) to rigth by one column. The result is that the grid is repinted starting from column 2.
When we scroll to last column, this one fill all the space and there is no way to scroll over (to left) in order to show the text remain.
I think i'm missing something with scroll option.
Here some screen shot

  1. Program Start

  2. File loaded

  3. Scroll to last column (see the scroll bar indicator on the bottom)

As you can see, the column caption fills all the available space and is not possible to show text remains (because the scroll bar on the bottom is on the end.

Which scroll setting i'm missing ?

Thank's for your attention.

Best regards
Daniele

Now I understand what you try to explain.
This is a behavior of scrolling, that scrolling is always based on entire columns, i.e. a column cannot scroll half-way and entire columns always stick to the left side of the grid.
If you want to make the full text visible, you could use hints, i.e. set grid.HintShowLargeText = true

Hi Bruno,
thank's for your reply.

Regards
Daniele