2006 Mar 31 5:49 PM
Hi,
Can any one suggest how to handle an event for 'Tree Node Collapse' . I have checked with all the exised tree events.
thanks,
Venu
2006 Mar 31 6:16 PM
Try event LEFT_CLICK_RUN. Maybe you can keep track of which nodes are expanded and which aren't, and when that event is raised, you can compare your list with the actual state of the tree and decide that a node was collapsed.
Hope this helps,
Hans.
2006 Apr 03 12:05 PM
Hi Hans,
I have tried this event, this is not triggering .Can you please tell me is there any considerations for this event.
Thanks,
Venu
2006 Apr 03 11:42 PM
Assuming you've properly registered the event and created a handler and everything, I'm all out of ideas.
Sorry!
2006 Apr 03 12:42 PM
Hi Venugopal,
If you are doing tree control programmin then i can suggest you a approach for tree node collapse and expand.
for doing this follow these steps.
1. create a toolbar (use class cl_gui_toolbar), add a button and assign a FCODE to it.
2. here you register the following the event for the toolbar.
gs_event-eventid = cl_gui_toolbar=>m_id_function_selected.
3. here you set the handler for the toolbar events
SET HANDLER gref_application->handle_function_selected
FOR gref_toolbar.
4. now in your class for gref_application you write a definition and implementation.
definition
handle_function_selected FOR EVENT handle_function_selected OF cl_gui_toolbar IMPORTING fcode.
implementation
CASE fcode.
when 'collapse'.
CALL METHOD xref_tree->collapse_all_nodes.
this method might change depending upon the class you use for creating the tree.
i hope this will help you.
in case of clarification do get back to me.
regards,
Kinshuk Saxena
PS mark helpful answers