op.expand
| Syntax |
op.expand (levels)
|
| Params |
levels is a number indicating the relative level to which the current heading is to be expanded.
|
| Action |
Expands the current heading to show headings to the number of levels indicated, or to all levels if levels exceeds the number of levels to which subheads are nested under the current heading.
|
| Returns |
True if one or more subheads was added to the display, false otherwise.
|
| Examples |
In examples.Sample Outline 2, position the bar cursor on "Subhead 1, Summit" and then double-click its item marker to collapse it (or execute "op.collapse ()" in the QuickScript window to accomplish the same thing). Now execute: op.expand (1)
The three main subheads under Subhead 1 appear on the display, while the subheads under "Subhead 1.1" remain hidden.
Now all of Subhead 1's subheads are visible.
As in many situations in Frontier, you can use the special keyword "infinity" when you aren't sure how many levels of subheads might exist beneath the present heading. In this case, the entire outline expands. Leaving the cursor at the summit, execute:
This time, nothing happens and the function returns false because there are no hidden subheads below the summit. |
| Errors |
An attempt to expand a heading with no invisible subheads returns a value of false but it is not an error.
|
| See Also |
op.collapse
|