Page 1 of 1

Toggle Tabset and Catalog simultaneously with one click?

Posted: 15 Oct 2024 02:32
by Schuller
Can I toggle a particular Tabset with a particular Catalog simultaneously with one button click?

Re: Toggle Tabset and Catalog simultaneously with one click?

Posted: 15 Oct 2024 02:56
by RalphM
Not out of the box AFAIK but maybe the Session Manager script would allow such - check it out in the Scripts section viewtopic.php?t=8691.

Re: Toggle Tabset and Catalog simultaneously with one click?

Posted: 15 Oct 2024 06:35
by highend
Let's assume you've saved two tabsets with the names: "First" & "Second"
The same for catalogs: "First.dat" & "Second.dat"

Code: Select all

    perm $P_Tab_Catalog_Toggle;

    if (!isset($P_Tab_Catalog_Toggle) || !regexmatches($P_Tab_Catalog_Toggle, "(1|2)")) { $P_Tab_Catalog_Toggle = 1; }

    if ($P_Tab_Catalog_Toggle == 2) {
        $P_Tab_Catalog_Toggle = 1;
        $catalog = "First.dat";
        $tabset  = "First";
    } elseif ($P_Tab_Catalog_Toggle == 1) {
        $P_Tab_Catalog_Toggle = 2;
        $catalog = "Second.dat";
        $tabset  = "Second";
    }
    catalogload $catalog;
    tabset("save");
    tabset("load", $tabset);
    writepv;

Re: Toggle Tabset and Catalog simultaneously with one click?

Posted: 15 Oct 2024 14:01
by Schuller
This is amazing!

Just tried it and works perfect to synchronize/toggle my Catalogs with my Tabsets.

Thanks

Re: Toggle Tabset and Catalog simultaneously with one click?

Posted: 15 Oct 2024 14:14
by highend
No problem and... thanks (again) for the donation :tup: