Toggle Group Collapse/Open, is this possible?
Set GROUPCOLLAPSE=toggle does not work
Currently I use the two commands below but they are in separate buttons.
Go GROUPEXPAND=*
Go GROUPCOLLAPSE=*
Toggle Group Collapse/Open, is this possible?
Set GROUPCOLLAPSE=toggle does not work
Currently I use the two commands below but they are in separate buttons.
Go GROUPEXPAND=*
Go GROUPCOLLAPSE=*
When I look that up in the manual, I see:
(Emphasis is mine.)
The following works for me:
Set GROUPCOLLAPSE=Toggle
Go REFRESH
I've attached a .dcf of the button for convenience.
Collapse.dcf (300 Bytes)
This code toggles the expanding and collapsing of groups.
Set GROUPCOLLAPSE=Toggle
@toggle:if GROUPCOLLAPSE=Toggle
@ifset:GROUPEXPAND=*
Go GROUPCOLLAPSE=*
@ifset:else
Go GROUPEXPAND=*
Go REFRESH
Amorax: Line-by-line, can you explain what your code does?
The code above is sufficient, ideally It should be able to work without refreshing though.
Leo & Jon, can the toggle aspect of this function be updated to work without having to refresh so that the selection isn't lost. The refresh seems like a bad hack that drops the selection.
Users just need to toggle group collapse without refresh.
The Set GROUPCOLLAPSE
command simply modifies the Collapsed flag in the current folder format:
This flag controls whether groups start out as collapsed or not. It isn't meant for expanding or collapsing existing groups.
You can use this now:
@if:enabled Go GROUPEXPAND=*
Go GROUPEXPAND=*
@if:else
Go GROUPCOLLAPSE=*