Tutorial video: Column resizing & folder formats

Very nice kitty. :smiley:

BTW, script post above has been updated to include tbone's improvements to the script.

Hi @Leo @tbone, thank you for the joint effort on Auto-Resize All!

One question: I thought the button was meant to toggle, but when I click a second time, the columns don't return to the original format. Did I misunderstand?

The second time it will run Set FORMAT=!folder which (simplifying slightly) re-loads the format saved for the folder.

That should usually make it a toggle, but not in situations where you start from a different format to the folder's normal one.

EDIT: I realize that this is going on a tangent from the main point of the thread, and that the button comes without guarantees. So please feel free to ignore. :slight_smile:

@Leo It's doing what you describe for some folders, but apparently not others.
On the attached video, to show that we're starting from the initial layout, I press the smiley button, which is just
Prefs LAYOUT="My Lister"

At that stage note how wide the first column is.
After clicking the Autosize button twice, the first column doesn't return to the same width.

Here is what seems to happen:

  1. With a new tab, hovering over the format lock shows "Default Format". For these tabs, the button works "properly".
  2. With a tab from a saved layout, hovering over the format lock shows 'Tab #x is Lister Layout "My Lister"'. For these tabs, the button doesn't return to the original format.
    autosize.7z (1.8 MB)

Set FORMAT=!folder resets to the format for the folder. If you loaded a layout that applied a custom format instead, it won't reset to that; I think you'd have to re-apply the layout instead.

If you're using the layout as your normal way of viewing things, I'd recommend saving that folder format as your default (or saving it as a path format for the folder, if it's only applicable to that folder), and then turning off the layout's format entirely. Lots of things will work better then, since not every method of opening a lister, or opening that folder, will use that layout.

On the other hand, if the layout is being used to open a folder in a way that's different to how you would normally view that folder, then the script would need to work differently, since it currently assumes you want to reset back to the folder's format, not the last-loaded-layout's format. There are a few ways you could tackle that, depending on exactly how you want it to work.

@Leo I'll follow your suggestion and change the default format. Thanks!

Just wanted to say thanks everyone for the information, helpful and enjoyable video, and for the cat pictures! :slight_smile:

Thank you Leo and Tbone. This was the best 19 minutes I spent all week

In the video, there was an alternative to the button, i.e. a right click on the column header from where to run the same script. How can you add this function to the column context menu?

Settings > Customize > Context Menus > Column Header (from memory, may have a slightly different name).

Once editing the menu, you should be able to download the .dcf file above and then drag it into the menu.

Great, thank you! It wasn’t an obvious place to find.

Is this a bug?
I used the new Auto + Fill and Expand options successfully on some folders, but Opus seems to bug on content type formats.
For instance, I set this on music folders, so that basic information is always shown:

1%20setting

As you can see, the ‘Expand’ columns take over the filename grossly.

Trying to diagnose it, I looked at the origin, which is what I expected:

3%20origin

Let’s see the current folder options (I do not have specific ones); there is something not matching what it should: why the ‘Expand’ columns converted themselves as ‘Auto’?

Needless to say, I tried again on a new configuration out‐of‐the‐box, but I get the same results on Opus 12.10; therefore it doesn’t come from my configuration.

Your Default Format may have Display / Auto-size all columns in Details and Power modes set.

Thanks, your idea solved it.
Since this checkbox is there by default, this means that almost everyone who uses the ‘Expand’ option might have their settings overridden, unless they untick it.

I think it is only set by default on older configs.

Any chance that you allow the ‘Auto + Fill’ format columns to be resized by the user? I can’t understand why they shouldn’t be like any other width type.

Right now the effect is that contrary to other width types, your column will widen if a new file appears in the list, but will not contract back if the longest file name is deleted. Also, you could want to extend temporarily the column to see the whole file name, but you can’t. And there are other legitimate reasons that you might want to resize a column that has the ‘Auto + Fill’ width.

Sorry to go off-topic, that's a nice dark theme you have, would you mind sharing the profile?

merdam, if you were referring to the theme I use, I just installed this one: Simple Windows 10 Dark Theme

Is there any way that the script could put a checkmark on the context menu when clicked (and/or highlight the button)? Then remove the indicator when clicked again?

I don't think there's a good way in this case, without it getting out of sync.