Jump to content


AutoSize Columns and Column Resizing

  • Please log in to reply
1 reply to this topic

#1 Uwe Raabe

Uwe Raabe
  • Members
  • 5 posts
  • Gender:Male

Posted 27 June 2019 - 01:45 PM

I have the following requirement fo the grid:


  • There are several columns, some are fixed size and some can be resized by the user
  • When the complete grid is resized, the variable columns should be resized with a constant factor

Enabling AutoSize for the variable columns doesn't give me the desired effect. Perhaps I am doing something wrong.


These are the unexpected effects I see:


  • While designing in the IDE, when I set AutoSize for one column, everything is fine. As soon as I continue with the next columns, the width ratio between the columns begin to differ. 
  1. start with 4 columns all width = 80
  2. set first column to AutoSize, width changes to 124 (assuming that we have 44 free space)
  3. set second column to AutoSize, width changes to 132, but first column width changes to 72 (expected: 102 each, because  80 + 80 + 44 = 204)
  4. set third column to AutoSize will give the following widths for the 4 columns: (61, 111, 111, 80)
  5. set fourth columns to AutoSize will give result to (56, 102, 102, 103)

It looks like the problem is the step from 1 to 2 AutoSize columns.


  • After making all of the AutoSize columns equal sized again, I start the program and all designed width are changed in a way that column 1 and 2 are not even visible, column 3 is pretty small and column 4 takes more space as is available, so that a horizontal scrollbar is shown.
  • Manually sizing the columns is not very intuitive, probably because the AutoSize mechanism is stepping in trying to do its job. When you move a grid line between two AutoSize columns it affects all AutoSize columns instead of only the two next to that line.

I have attached the test project.


Is there something else I have to take into account when setting AutoSize to True for several columns?



Attached Files

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,831 posts
  • Gender:Male

Posted 27 June 2019 - 02:48 PM

Hi Uwe,


I will look at your project and try to find solution. It may take few days.

boki@bergsoft.net | LinkedIn Profile
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
BergSoft Facebook page
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users