Adding Expand All and Collapse All Functionality

The next step is to add "Expand All" and "Collapse All" functionality, to be able to expand or collapse the outline. To do this:

 case ctrlName = 'B_EXPAND'

 Send_Message(WinId: '.LB_H', 'EXPAND', 0, 3)

 

 *collapse the entire list to the first level

 case ctrlName = 'B_COLLAPSE'

 Send_Message(WinId: '.LB_H', 'EXPAND', 0, 1)

The buttons should expand or collapse the outline when clicked.