Page History
...
Add a button control to the form called B_EXPAND and type Expand All in the Text property. Code the same QuickEvent parameters for the CLICK event (calling TEST_LB() with '@SELF','CLICK') as for the B_POPULATE button in the previous step.
Add another button control called B_COLLAPSE, and type Collapse All in the Text property. Code the same QuickEvent call as for B_EXPAND.
Add the following code to TEST_LB(). The The code consists of additional CASE statements that detect which control is calling the function, and then sending the expand or collapse message to the list box.
Code Block |
---|
*expand the entire list (in this case there are a total of 3 levels)
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.