Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Double click on node

Former Member
0 Likes
1,092

Dear Colleagues !

I have a tree :

class lcl_tree definition inheriting from CL_COLUMN_TREE_MODEL.

...

data: G_TREE TYPE REF TO lcl_TREE.

...

CREATE OBJECT G_TREE

EXPORTING

NODE_SELECTION_MODE = CL_COLUMN_TREE_MODEL=>NODE_SEL_MODE_MULTIPLE

...

It works fine. I want to react to double click of a node:

event-eventid = CL_GUI_COLUMN_TREE=>EVENTID_NODE_DOUBLE_CLICK.

event-appl_event = 'X'.

APPEND event to events.

CALL METHOD G_TREE->SET_REGISTERED_EVENTS

EXPORTING

EVENTS = EVENTS

EXCEPTIONS

unknown_event = 1

ILLEGAL_EVENT_COMBINATION = 2.

But it doesn't happen anything.

I enhanced it:

CLASS gcl_events_hndl DEFINITION.

PUBLIC SECTION .

METHODS handle_node_double_click

FOR EVENT node_double_click

OF lcl_tree

IMPORTING node_key sender.

ENDCLASS.

DATA: l_event_receiver TYPE REF TO gcl_events_hndl.

...

CREATE OBJECT l_event_receiver.

SET HANDLER l_event_receiver->handle_node_double_click FOR g_tree.

And I have the same, nothing ...

Can You propose me anything ?

Thanks a lot and kind regards

Peter

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
768

Hi Peter,

I saw a std demo program (SAPCOLUMN_TREE_MODEL_DEMO) where they have implemented ur cl_column_tree_model class... Also dey hav implemented node_double_click event.....might be helpful..

Cheers,

Jose.

3 REPLIES 3
Read only

Former Member
0 Likes
769

Hi Peter,

I saw a std demo program (SAPCOLUMN_TREE_MODEL_DEMO) where they have implemented ur cl_column_tree_model class... Also dey hav implemented node_double_click event.....might be helpful..

Cheers,

Jose.

Read only

uwe_schieferstein
Active Contributor
0 Likes
768

Hello Peter

Depending on "object" on which you double-click you either trigger event NODE_DOUBLE_CLICK or ITEM_DOUBLE_CLICK. The NODE_DOUBLE_CLICK event is only triggered if you click on the leftmost part of the node.

Have a look at my sample report ZUS_SDN_ALV_TREE_DEMO_1 in thread

Depending on where you double-click the raised event is displayed as I-message.

Regards

Uwe

Read only

0 Likes
768

Hi Jose, hi Uwe !

I could solve the problem thanks to Your helpful proposals.

Thanks a lot and kind regards

Peter