Use these buttons...
@hideif:=Val("$lst:myLayout")=="Default Layout"
Prefs LAYOUT="Default Layout"
@hideif:=Val("$lst:myLayout")=="Small Layout"
Prefs LAYOUT="Small Layout"
... with this script in the background that will make the current layout available to buttons:
function OnInit(initData) {
initData.name = 'SaveLayoutAsVar';
initData.version = '2024-06-10';
initData.url = 'https://resource.dopus.com/t/hide-layout-buttons/51212';
initData.default_enable = true;
initData.min_version = '12.0';
}
function OnActivateLister(activateListerData) {
activateListerData.lister.vars.set('myLayout', activateListerData.lister.layout);
}
Save EventSaveLayoutAsVar.js.txt toββββ
%appdata%\GPSoftware\Directory Opus\Script AddIns
How to use buttons and scripts from this forum
Up for a challenge? Use a single button with a dynamic label.