Script to toggle "large icons" ON/OFF for toolbar buttons?
-
ghost zero
- Posts: 842
- Joined: 26 Apr 2010 17:48
Script to toggle "large icons" ON/OFF for toolbar buttons?
Does anyone know how to make a script to toggle "large icons" ON/OFF for toolbar buttons?
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: Script to toggle "large icons" ON/OFF for toolbar button
toolbar( , 1);//Largeghost zero wrote:Does anyone know how to make a script to toggle "large icons" ON/OFF for toolbar buttons?
toolbar( , 0);//Small
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: Script to toggle "large icons" ON/OFF for toolbar button
Sorry thats not complete as its not a toggle:
One way is to have an ini file with toggle info.
Another way would be use save settings and retrieve key ToolbarLarge from ini and set the other size automatically. Second one has the disadvantage of settings being saved each time to retrieve that info.
One way is to have an ini file with toggle info.
Another way would be use save settings and retrieve key ToolbarLarge from ini and set the other size automatically. Second one has the disadvantage of settings being saved each time to retrieve that info.
-
highend
- Posts: 14942
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Script to toggle "large icons" ON/OFF for toolbar button
Just use a permanent variable...
E.g.:
E.g.:
Code: Select all
if (isset($P_ICON_TOGGLE_LARGE)) {
toolbar(, "0");
unset $P_ICON_TOGGLE_LARGE;
} else {
toolbar( , "1");
perm $P_ICON_TOGGLE_LARGE = "True";
}
One of my scripts helped you out? Please donate via Paypal
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: Script to toggle "large icons" ON/OFF for toolbar button
Oh yes, i keep forgetting about PVs.highend wrote:Just use a permanent variable...
-
ghost zero
- Posts: 842
- Joined: 26 Apr 2010 17:48
Re: Script to toggle "large icons" ON/OFF for toolbar button
unfortunately, that requires a second click before it starts working during the session. is there a smoother solution?highend wrote:Just use a permanent variable...
E.g.:Code: Select all
if (isset($P_ICON_TOGGLE_LARGE)) { toolbar(, "0"); unset $P_ICON_TOGGLE_LARGE; } else { toolbar( , "1"); perm $P_ICON_TOGGLE_LARGE = "True"; }
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: Script to toggle "large icons" ON/OFF for toolbar button
XY will remember permanent variable for you if you enable:ghost zero wrote:unfortunately, that requires a second click before it starts working during the session. is there a smoother solution?
Configuration | Refresh, Icons, History | Remember permanent variables
-
ghost zero
- Posts: 842
- Joined: 26 Apr 2010 17:48
XYplorer Beta Club