A training video showed a window with many headings expanded. Here's a sample of this type of control: table of contents in a Bible:

The control is the triangle icon at the left of the line. If you click it, the list will expand or collapse.
The video said that right-clicking on the control would collapse the whole list. Great idea.
How about applying this code to a Bible's table of contents?