Command for "double-clicking" a column divider?

What is the command equivalent to a double click on a column divider, ie. a one-shot resizing of a column without regard for any configured max width?

I tried workarounds like Set COLUMNSADD=name(0,a,999), but that changes the column's config, which I'd like to avoid...

Thanks!

I don't think there is a command for that.

You could resize it using the command you found, and then undo that later via this:

Set FORMAT=!folder`

Slightly improved version of the command from your post (doesn't move the Name column, and completely removes the max limit instead of setting it to a large value):

Set COLUMNSADD=name(!,a,0)
1 Like

Very good, Leo, thanks for both commands!

would the command be equivalent to changing the width of whichever column to autosize? Am I understanding the author correctly as to what he is referring to by double clicking the separator between column headers? Is it possible to create a command that would produce an effect like this to a specific column or whichever column is being focused on? This seems incredibly useful to me now that I am thinking about it.

You could add it to the column header context menu (Customize -> Context Menus -> Column Header)

Set COLUMNSADD=%header%(!,a,0)

I don't know if there's a way to find out the column from a (right) click inside the actual file display. Never tried that...

In the next update we'll enhance the Set AUTOSIZECOLUMNS command to allow it to work on specific columns.

4 Likes

Here's a top level button that toggles between a name column that is wide and standard width.

Wide-Standard Width Name Column Toggle.dcf (553 Bytes)

Here's a column header context menu button that toggles between the current column that is wide and standard width.

Wide-Standard Width Current Column Toggle.dcf (560 Bytes)

Thank you for the example, jinsight.

I'd suggest a slight improvement if you want to use a variable for tracking the state: A global variable isn't the best approach - better use a "src" variable. Otherwise, switching to dual mode or opening another lister will lead to errors.

For me, the update Jon has announced will be the solution.

Yes, the change in 13.6.2 works as described, but sadly it isn't the answer to my original question. The command Set AUTOSIZECOLUMNS=col:name does resize the column, but it still doesn't override the configured max value - it's not the equivalent to a double click on the column divider.

I'll stick with Leo's improved workaround for now. :smiley:

Jon you get a cookie for being a boss at your job. I really appreciate all you do here!

Of these commands you've posted, can any of them be set to a button where I can toggle autosize on/off
i.e. go autosize, and then toggle back to what it was set before?

We'll add a way to do that in the next beta.

Yes, but it requires scripting. There's an example script here which does something similar:

2 Likes

:tada: And it now works perfectly in 13.6.3:
Set AUTOSIZECOLUMNS=col:name,override

Thank you very much for your quick and very responsive support!!

2 Likes