TAdvColumnGrid Column Sizes Changing in IDE

Hello,

Am using TMS v10.5.8.1 with C++ Builder 10.4.2. My AdvColumnGrid version is 3.2.0.3.

Here is my problem. I have a grid with 5 columns. The sizes of the columns I have set to 59,59,282,190,190 respectively. When I close and reopen the IDE they are resized to 57,57,296,184,186.

I have over 40 grids in my application and this happens to all of them. What can I do to correct this?

Thank you,
Chad

Cannot be reproduced with a default TAdvColumnGrid on a new form.
Are you using any specific grid settings, in particular those related to column stretching?

Hello Bruno,

Thank you for the quick reply.

Under ColumnSize I have checked stretch, set column 2 as my stretch column and checked syncwithgrid. I also have sizewithform checked.

If I create a new application and place a 4 column grid on the blank form with these settings and set the stretch column to 2. Then set the column sizes to 50,50,177,80,80. Then close and open the IDE the columns are now set to 49,49,179,79,81.

I recommend to enable column stretching at runtime. Column stretching is calculated otherwise at design-time and there can and will be rounding effects from calculating based on ratio (%) between column widths.

Hello Bruno,

Thank you. I made the change you suggested and all works well.

Chad