Updating Lister layout by a custom button

I'm trying to create a custom toolbar button which on press will update the layout for the current lister only and without asking any questions.

Using the information on this page https://www.gpsoft.com.au/help/opus10/default.htm#!Documents/Prefs.htm I experimented and I found that Prefs LAYOUTSAVE=updatecurrent apparently saves the layout of all open listers under the current layout name. And also that there's no way to tell Prefs LAYOUTSAVE=single to use the current layout name -- it will always ask for that name and later will confirm if I want to overwrite the existing saved layout.

So is there a way to implement the behavior I need?

Sounds like you want to save a Style rather than a Layout.

1 Like

No, I'm interested in preserving the set of open tabs of a given window. I don't care about their appearance or how they are sorted etc.

I have a few separate 'workspaces' (i.e. sets of folders/tabs) which I don't want to mix because they are completely unrelated. Also each of these sets is not fixed, sometimes I add new tabs to them, and sometimes I close the existing ones -- thus the need for the button to quickly update the layout of the current window while not affecting the other Listers.

Styles will do that.

If you only want to save/load a single window, and you want to modify an existing window rather than open a new one, Styles almost always make more sense than layouts.

That said, if you literally only want to save and load the list of opens tabs, then Folder Tab Groups are what you want to use, not Styles. (Styles can contain Tab Groups, but if you don't want the rest of what Styles do then using Tab Groups on their own is simpler.)

https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Tab_Groups1.htm

Thanks, I will try that.