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

Capture Event

Former Member
0 Likes
407

Hi All,

I am using class cl_gui_picture class inorder to display a picture on my screen. I am handling an event of Picture_Click. Following is the code for the same.

CLASS c_reaction DEFINITION.

PUBLIC SECTION.

METHODS h1 FOR EVENT picture_click OF cl_gui_picture.

ENDCLASS. "c_reaction DEFINITION

Now when the picture is clicked, i want to import the parameters ( Coordinates of the mouse clicked ) from the method DISPATCH of CL_GUI_PICTURE.

So i implemented the above class as below.

  • CLass Implementations

CLASS c_reaction IMPLEMENTATION.

METHOD h1.

    • HOW TO IMPORT the coordinates ??

ENDMETHOD. "h1

ENDCLASS. "c_reaction IMPLEMENTATION

The method is exporting the parameters as follows :

WHEN EVENTID_PICTURE_CLICK.

RAISE EVENT PICTURE_CLICK

exporting mouse_pos_x = mouse_pos_x

mouse_pos_y = mouse_pos_y.

I am able to capture the event of picture click but along with it i want to capture the mouse coordinates which the event is exporting.

Please help.

Thanks,

Best regards,

Prashant

1 ACCEPTED SOLUTION
Read only

hymavathi_oruganti
Active Contributor
0 Likes
373

CLASS c_reaction DEFINITION

METHOD handle_picture_click

for event PICTURE_CLICK OF CL_GUI_PICTURE

IMPORTING MOUSE_POS_X

MOUSE_POS_Y .

ENDMETHOD.

ENDCLASS. "c_reaction IMPLEMENTATION

CLASS c_reaction IMPLEMENTATION.

METHOD handle_picture_click.

ENDMETHOD

    • HOW TO IMPORT the coordinates ??

ENDMETHOD. "h1

ENDCLASS. "c_reaction IMPLEMENTATION

1 REPLY 1
Read only

hymavathi_oruganti
Active Contributor
0 Likes
374

CLASS c_reaction DEFINITION

METHOD handle_picture_click

for event PICTURE_CLICK OF CL_GUI_PICTURE

IMPORTING MOUSE_POS_X

MOUSE_POS_Y .

ENDMETHOD.

ENDCLASS. "c_reaction IMPLEMENTATION

CLASS c_reaction IMPLEMENTATION.

METHOD handle_picture_click.

ENDMETHOD

    • HOW TO IMPORT the coordinates ??

ENDMETHOD. "h1

ENDCLASS. "c_reaction IMPLEMENTATION