op.collapse

Syntax op.collapse ()

Params None required

Action Hides all subheads at all levels under the current heading.

Returns True if anything was collapsed, false otherwise.

Examples In examples.Sample Outline 2, position the cursor bar at "Subhead 1.1" and execute:
op.collapse ()


   » true

Notice that all of the subheads below Subhead 1.1 disappear from the display; the next heading appears to be Subhead 1.2.

In examples.Sample Outline 1, position the cursor bar at "Subhead 2, Summit 2" and execute:
op.collapse ()


   » false

The display does not change and the function returns false because this subhead had no subheads to collapse.

Errors An attempt to collapse a heading with no visible subheads returns a result of false but it is not an error.

See Also op.expand

op.fullCollapse

op.fullExpand

Discuss