Toggle Custom Button

I have a custom button with the following:

Set HIDEFILTERFILENAME *.(bak|sfk|vf|gif)
Set GROUPBY=type
Set VIEW=Tiles

When I hit the button, all works as intended. However, when I hit it again to switch off the filter/group/view commands and bring the folder back to the defaults, the hidefiltername toggles back to showing all but the grouping and and view do not.

What's the method?

Anyone? Or is this a stupid question :confused:

As you have them written, the Set GROUPBY and Set VIEW commands do not toggle, whereas Set HIDEFILTERFILENAME does.
See the manual for details on how to make the other commands toggle. The alternative would be to use @ifset and provide the two group/view modes separately.

Something like this

Set HIDEFILTERFILENAME *.(bak|sfk|vf|gif) Set GROUPBY=type,toggle Set VIEW=Tiles,details

I confess to being thick as two short planks but I did read the manual and search (I always do) and didn't sort out how to do it. I was looking for toggle but...........

Set HIDEFILTERFILENAME *.(bak|sfk|vf|gif)
Set GROUPBY=type,toggle
Set VIEW=Tiles,details

that explains it. I still don't see why the first line toggles but as I said, thick.

Thanks for that.

Commands that set a filter automatically act as toggles, but most other commands don't (and sometimes can't, e.g. "Set VIEW=Tiles" on its own wouldn't know what the second mode you wanted to toggle to was).