How can I set a (favorite) folder format for a lister style or tab group?
I have some lister styles and each lister style has a corresponding tab group. When I select the lister style (and all tabs of the defined tab group open), all tabs should have the defined (favorite) folder format.
I don't want to specify the same format for each tab in a tab group.
Previously I'd a tab group "My Photo Tab Group" but then I can not select a folder format for all tabs in the tab group.
Now I have removed the tab group and can edit the format for the style - I choose "Format / Edit / Columns / Reset Page => Set From Favorites => My Photo Format.
I select the style with this code
Prefs STYLE "My Photo Style 1"
Go TABGROUPLOAD "My Photo Tab Group" OPENINLEFT
Go TABGROUPLOAD "My Photo Tab Group" OPENINRIGHT
Set SOURCE=left
which shows the tab on the left with the default format - but the same tab (same tabgroup opens on left+right) on the right shows the photo format instead of default format (bug).
Additionally the 3rd bug:
After selecting the style (+ open tab groups), when I select on the left display the tab groups, DO correctly shows the selected "My Photo Tab Group", but the right display still shows the "My Default Tab Group".
Maybe this will help. Click this button and it will assign the My Photo Format format to all tabs on both sides of the current window.
If that's the only aim of the style, then you're good to go and can use the button instead of the style. Otherwise, if you want the style to also open the folder tabs, you can re-save the style after clicking the button to update the format in all tabs.
Is it possible to "link" the format of a tab to a favorite format?
So when I change/update the favorite format - all tabs (who are linked to this favorite format) automatically use this updated format.
Currently I can only "copy" a tab format within "Edit tab group" by selecting each tab, click "edit format", walk through each part and select "reset page / set from favorites". So when I change the favorite format I can do all steps again, right?
Sorry for the question - but at the moment I'm more confused before I started.
You might be able to do something with an event-driven script that applies the format after the style is loaded, but there's nothing like that built in.
Is the purpose of the style just to change the format, or to load a tab group, or both?
Is the format one that you don't always want for those folders, only sometimes?
I've tried to add an event-driven script but when I select the style the for-loop only rotates over one tab of each display (left/right) and not over all tabs per display opened by the style via the tabgroup (finally 8 tabs are open left and 8 right).
function OnStyleSelected(styleSelectedData)
{
if (styleSelectedData.style == "My Photo Sortin 1")
{
var formatName = "My Photo DateTaken";
var cmd = DOpus.Create.Command;
cmd.ClearFiles();
cmd.deselect = false;
for(var eTabs = new Enumerator(styleSelectedData.lister.tabs);
!eTabs.atEnd(); eTabs.moveNext())
{
DOpus.Output("Tab: " + eTabs.item().displayed_label);
//cmd.SetSourceTab(eTabs.item());
//cmd.RunCommand('Set FORMAT="' + formatName + '"');
}
}
}
Maybe we can make it like OnOpenLister where scripts can be called both before and after all the tabs are loaded.
At the moment, you could set a variable on the lister which tells you it has loaded that style (and clear it if another style is loaded), then use OnOpenTab and/or OnAfterFolderChange to apply the formats to tabs/folders as they open, if they're in a lister with the variable set.
That would let you cover new tabs opened after loading the style as well, if you want that. (If you don't want that, setting another lister variable to a timestamp of the event would let you ignore events that happen more than a few seconds later.)
OK ... it becomes more complex and today is the 4th day of my holiday I play around with that. Not that what I want to do during my holiday.
What drives me nuts ... to understand the formating of folders:
I have my "user format" only (beside a favorite format).
I'd the columns "modified" and "created" (in this order).
I created some styles with tab groups (some tabs and all formats (all parts of each tabs) are disabled) - like this:
so I expect the "user format" will be used, or not?
Now I have changed my "user format" and swapped the columns to "created" and "modified".
I select the style (or any other), but still get order "modifed" + "created"
Then I did the test:
I selected on tab of the tab group of a style, activated "Columns and Grouping", changed the columns to order "created" + "modified", unselected(!) "Columns and Grouping" and "OK":
Then I re-selected the style and all tabs still show "Modifed" + "Created" but the one tab I just changed shows "Created" + "Modified" - although all parts of the format are disabled.
So how the hell does it work (which I must ask after using DO for more then 12 years)?
If you want the default/user format to be used you should not normally need a style for that. That should be the format the folders get by default, unless some other format is overriding things for the particular folders.
Set the style and tab group to leave the format untouched entirely if you want the folders to get their natural formats, the same as if you opened a new window and navigated to them.
At any time, hover over the format lock on the status bar to find out which format is being used and where it came from. That and lots of other details about how to understand how the format is chosen can be found here (although using Styles on top of things can complicate things further than the guide goes into):
Folder Formats can be complex because they let you do a lot of different things. Without the complexity, the answer would be like in File Explorer: "you can only show each folder one way".
I have also tried the "My Video" style and the other style for the test case also with a Not-Selected Format Lock (=unlocked). Finally no difference. Format will be always based on Tab of Tab Group although not selected.
Why is the folder format of the tab from the tab group used although "Columns and Grouping" (and all other parts) are not selected?
I'll need some time to look through this and work out what's going on (both in the thread and in the code).
We're also thinking about making it so Tab Groups, Styles and (possibly) Layouts can refer to Favorite formats indirectly, so you can set them up once and then only need to change one thing. (That won't make it into 12.10 as we've locked down UI changes for translations to begin, but it might be in a later version, depending on how difficult it turns out to be.)
If you only take a look on my last post of this thread and try to re-create the problem that's enough (should be a new thread more or less).
Yes - defining some favorite formats (on one place) and linking to it instead of having extra possibilities of formats would be much easier to manage for beginners and experts.
In the meantime I can live with Modified/Created order (I'll wait for new DO release) and with the first script as a button. I only sortin pictures 1-2 times per year.
In case of you need to take a look on my PC - Teamviewer is installed.