Hiding sections on the status bar

It's possible to configure a section of the status bar definition to only be displayed if a particular value is non-zero (or is zero). The default status bar definition uses this when it displays the number of hidden items in the current folder. Rather than have a count of zero showing when no items are hidden, the section is hidden completely - it is only displayed when one or more items are actually hidden.

 

The section that is to be conditionally hidden is surrounded with a pair of special codes. Opus looks at the values of all status bar codes within the section, and applies the desired test.

 

For example:

 

        {h#}{sd}/{td} folders, {sf}/{tf} files{h#}

 

This displays the selected and total number of folders and files. If there are no files or folders at all, the section will be hidden.

 

Status bar codes can also be included within the condition codes themselves. This lets you test status bar values without actually displaying those values on the status bar. For example:

 

{h?{si}}{ti} object(s){h?}{h!{hi}?{si}}{h!}{si} object(s) selected{h!}

 

This contains two conditionally hidden sections. Each section tests the value of the {si} code (number of selected items) in a different way, meaning only one of the two sections will be displayed at once.

 

You can even embed multiple condition codes to perform more complex tests. For example, {h!{sf}?{sd}} ... {h!} will display the conditional text only if {sf} (selected files) is non-zero and {sd} (selected folders) is zero.