This event occurs when an item in a Tree View control is about to expand or collapse. EVENT-DATA-1 and EVENT-DATA-2 are set in the same manner as for the event MSG-TV-EXPANDED. You can prevent the control from expanding or collapsing the item by setting EVENT-ACTION to EVENT-ACTION-FAIL. Note that the runtime will send both of these events in response to the user pressing the + or * keys. The difference is that these messages are sent regardless of whether the particular item is expanded already or not, whereas a mouse event will only cause the EXPANDED messages to be sent if the item is not already expanded. This fact can cause problems in COBOL programs, so programmers should be aware of it.
The + and * keys will generate an EXPANDED message with EVENT-DATA-1 set to TVFLAG-EXPAND, while the - key will generate an EXPANDED message with EVENT-DATA-1 set to TVFLAG-COLLAPSE.