Double-click sizing lines to auto-size column widths
Information in the help file for wwDBGrid indicate that columns can be auto-resized by double-clicking on the resizing lines in the title. I can't seem to find a property for that, and it doesn't seem to work automatically otherwise. Any ideas where a property might be found or any other setting to allow that feature to work?
TIA.
-
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.
-
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.
-
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.
-
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!
Please sign in to leave a comment.
Comments
6 comments