2007 Jun 27 1:44 PM
Hi guys,
4.0B: I have a big table control that the user will need to scroll.
The table control allows only single line selection, however, when you scroll
the selected line off-screen (e.g. by using the mouse scroll button or the scrollbar), the line remains selected even when you select a new one.
I haven't been able to try this behaviour out yet in a newer release.
Does anyone know a fix for this? (btw - scrolling using the scrollbar does not trigger an ok_code)
Thanks in advance.
Hi guys,
4.0B: I have a big table control that the user will need to scroll.
The table control allows only single line selection, however, when you scroll
the selected line off-screen (e.g. by using the mouse scroll button or the scrollbar), the line remains selected even when you select a new one.
I haven't been able to try this behaviour out yet in a newer release.
Does anyone know a fix for this? (btw - scrolling using the scrollbar does not trigger an ok_code)
Thanks in advance.
2007 Jun 27 2:38 PM
I have currently implemented a 'quick fix':
- in PBO, compare current TC-top_line with previously saved TC-top_line
- if scrolling is detected, all selection fields are deleted
This is a coarse hack, but I don't have the inspiration to improve this, currently.
Does any of you guys have a better idea?
Thanks,
Rob
2007 Jun 27 3:17 PM
Nevermind, I found a way.
For my own reference I'll give the code.
PROCESS AFTER INPUT.
MODULE exit_command AT EXIT-COMMAND.
LOOP AT gt_assort.
FIELD gs_assort-sel MODULE tc_mark ON REQUEST.
MODULE tc_assort_pai.
ENDLOOP.
MODULE user_command_0100.
and the module:
MODULE tc_mark INPUT.
DATA: ls_assort LIKE gs_assort.
CLEAR ls_assort.
IF tc_assort-line_sel_mode = 1 AND
gs_assort-sel = 'X'.
** clear SEL in whole TC
MODIFY gt_assort FROM ls_assort TRANSPORTING sel WHERE sel = 'X'.
** set SEL in current line
MODIFY gt_assort FROM gs_assort INDEX tc_assort-current_line
TRANSPORTING sel.
ENDIF.
ENDMODULE. " TC_MARK INPUT
Cheers,
Rob