Tutorial video: Column resizing & folder formats

A 19 minute tutorial video for Directory Opus 12, covering File Display Column Resizing, Folder Formats, and more!

youtube.com/watch?v=jS1Mvs46WH8

If you're after the script shown at the end, it's here a few posts down.

3 Likes

As always useful and it's just more intuitive and funnier than reading manuals. Now column-sizing works here the way I always wanted :slight_smile:! Thanks Leo.

Oh wow these videos always make me realize how deep the Opus is and how much stuff I don't even expect Opus (has or) can do!

Also great production Leo! :thumbsup:

There's even a Wilhelm Scream which I guess became a sort of easter egg in these videos!

Loved it!
It was very helpful for me to see you move through these use cases -- it really helped to understand how these modes work together.
Also, that's an insanely cute kitten! I thought I'd handled some cute kittens over the past few days, but this one is a supermodel.

You mentioned that more vids are on the way... Looking forward to them.
Thank you Leo!
:thumbsup:

I could sit and watch this for hours, thanks!
It's a pleasure to see you clicking around in DO quicker than people can blink - like a boss you did. o)

Is the auto/fill-column toggle button to be found in the forum somewhere? I'd be pleased to use that! o)

Here it is (updated with tbone's improvements; see below):
Auto-Size All.dcf (1.44 KB)

Update:

  • tbone has improved the script to work with column names that contain spaces, here. I overlooked that, since none of the internal column names use spaces, but it is needed for script columns (including some of my own :blush:).
  • It has also been changed to not deselect everything when you use it.
  • Copying tbone's changes here to keep everything in one place:

JScript: (v0.3 - tbone's improvements)

function OnClick(clickData){
   var colParams = "";
   for(var e = new Enumerator(clickData.func.sourcetab.format.columns); !e.atEnd(); e.moveNext()){
      var col = e.item();
      if (!col.Autosize || col.Max != 0){
         if (colParams) colParams += ",";
         colParams += col.Name;
         colParams += "(!,a,0)"; // Keep position. Auto-size. No maximum.
      }
   }
   var cmd = "Set FORMAT=!folder";
   if (colParams) cmd = 'Set COLUMNSADD="'+colParams+'"';
   clickData.func.command.deselect = false;
   clickData.func.command.RunCommand(cmd);
}

Installing:
As shown in the video, this script can be added to the Column Header Context Menu, by updating the Lister Column Header in the Customize dialog.
image

Original version shown in the video

JScript (original version shown in the video):

function OnClick(clickData)
{
	var anyColumns = false;
	var cmdLine = "Set COLUMNSADD=";
	for(var e = new Enumerator(clickData.func.sourcetab.format.columns); !e.atEnd(); e.moveNext())
	{
		var col = e.item();
		if (!col.Autosize || col.Max != 0)
		{
			if (anyColumns) cmdLine += ",";
			cmdLine += col.Name;
			cmdLine += "(!,a,0)"; // Keep position. Auto-size. No maximum.
			anyColumns = true;
		}
	}
	if (!anyColumns) cmdLine = "Set FORMAT=!folder";
	clickData.func.command.RunCommand(cmdLine);
}
2 Likes

@Leo thanks for the button! :thumbsup:

On another topic:
someone wants to know how the other guy managed to squeeze into a screen.


Sorry, couldn't resist.
Greetings from Turkey, where people seem to love cats. Never seen so many kitties anywhere, and people are leaving food for the street cats. By the way, learned the other day that the Turkish word for cat is kedi -- really rhymes with kitty.

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.