Page 1 of 1

Auto adjust columns widths

Posted: 2009-04-17, 04:28 UTC
by margolis22
It would be nice to double click between columns and they would auto size the the length of the content. A lot of times the EXT field is a lot larger than it needs to be so instead of dragging the field to shrink it, double clicking to auto adjust the size of the column would save a lot of time.

Posted: 2009-04-17, 08:02 UTC
by fenix_productions
2margolis22
Support++

It's been proposed on this board few times already but haven't been done yet.

Posted: 2009-04-17, 10:25 UTC
by van Dusen
2margolis22

Several months ago I tried to add a "auto column width" feature using an AutoIt3 script, but in the end I failed and I abandoned the further development of the script. The code looks (and is ;) higgledy-piggledy, because I tried several ways to calculate the required values. If you are still unafraid, you can test my script "TCAutoColumnWidth":

TCAutoColumnWidth.zip (rapidshare.de)
(Click on "Free" button at the bottom of the page)
or
TCAutoColumnWidth.zip (filefactory.com)
(Click on "Download for free with FileFactory Basic" link)


It works for "full" and "custom columns" view and trys to set the optimal width for each column depending on the longest column content (but it doesn't add "auto fit on tab header delimiter double click" functionality, sorry).
I didn't find a way to set the column widths directly, so the script needs to open/edit/close the "Custom column" / "Tabstops" configuration dialog. I can't solve a timing problem, thus the calculated values will not be transfered to the appropriate configuration dialog or the dialog will not be closed automatically sometimes.
I didn't find a way to reliable calculate the display units for any font name / font size / font attribute combination automatically. Thus, you can call the script giving it two correction factors via commandline parameters ("/s=n.nn" and "/n=n.nn"); in order to find the values, which fits best to your font used for TC's file panes, just slightly mess around with them.