Double-click sizing lines to auto-size column widths

Comments

6 comments

  • Marinus Willemstijn

    Is it not the one under Options [dgDblClickColSizing]

    0
    Comment actions Permalink
  • Howard Fox

    It is, and thanks for the reply. I don't know how I managed to overlook it, except that pressing F1 while the "Options" property is selected, brings up the generic VCL help file, and I must have not hit on the correct wording when I searched the IP help file. I also sometimes "can't see the forest for the trees" as the saying goes.

    Unfortunately, despite the fact that it's enabled for my grid, which doesn't do anything especially complex, it doesn't seem to do anything when the app is run. Are there any other options or properties that might prevent it from working, or additonal properties that need to be enabled?

    Thanks again.

    0
    Comment actions Permalink
  • Marinus Willemstijn

    Pehaps dgColumnResize is False? True by Default if I remember correctly.

    Did you try with a grid with Default settings and just changing the one Property as I indicated?

    Something I have deemed a problem is when Fixed Cols is > 0 then it SEEMS to not have resizing enabled as it doe snot give the Splitter Cursor as usual.

     

    0
    Comment actions Permalink
  • Howard Fox

    Seems I'm in for some tedious debugging. dgColumnResize is true, so that's not the problem. However, I created a very simple test project using the same data as the other app. Double-click column re-sizing works just as it should. Something else is obviously wrong in the other program, although it's such a small, simple program, I'm having a hard time thinking that it's THAT different from the test project. In fact, the problem program is small enough, I may just start over with everything in its default state and add things back one-by-one. Until I find time for that, I'll live without that capability.

    Thank again.

    0
    Comment actions Permalink
  • Charles Heaps

    Check to see if you've got any events attached to the grid that might be overriding the default behavior.  You can always comment those out temporaily while you debug.  Perhaps also worth checking some of the grid options such as dgPerfectRowFit and dgColumnResize, which may interact with dgDblClickColSizing. Hope this helps!

    0
    Comment actions Permalink
  • Howard Fox

    Thanks for the suggestion. It’s a great idea, and since there are few events involved at this point, that should be an easy task.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk