2008 Feb 06 9:51 AM
Hello Every Body,
please can someone tell me how can implement Doppelclick using Global classes.!!
Best regards.
daniel
Hello Every Body,
please can someone tell me how can implement Doppelclick using Global classes.!!
Best regards.
daniel
2008 Feb 06 10:11 AM
Hello Daniel
I assume you want to handle DOUBLE_CLICK events of controls (e.g. ALV grid, tree) using global classes.
That's a piece of cake. Below I outline a possible procedure:
(1) Create your control instance (e.g. go_grid, CL_GUI_ALV_GRID)
(2) Create an instance of your global class. The CONSTRUCTOR method may look like this:
CREATE OBJECT go_myclass
EXPORTING
io_instance = go_grid. " Assumption: class should only handle ALV grid events
METHOD constructor.
me->mo_grid = io_instance. " class may have instance attribute for grid instance
me->set_handler( ). " perhaps private method for setting event handler
...
ENDMETHOD.
METHOD set_handler.
SET HANDLER: handle_double_click FOR me->mo_grid.
ENDMETHOD.
(3) Create an event handler method (e.g. HANDLE_DOUBLE_CLICK for event DOUBLE_CLICK of cl_gui_alv_grid) within your global class.
That's it. As soon as the user double-clicks on a row in the ALV grid (go_grid) the method HANDLE_DOUBLE_CLICK of your global class will be called to handle the event.
Regards
Uwe
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |