Application Development 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: 

Capturing Scroll Event

abhishek_katti
Explorer
0 Kudos

Hi Expert,

I have a vertical scroller in my table control and I have also declared the Functions as PageUP, PageDown, FirstPage & Last Page in PF-status.

When I use to scroll through mouse or with Page up/Page down keys, my module pool program doesnt capture any event(OK_CODE) as functions I have declared. The OK_CODE is blank for such functions/events.

Please help me what I'm missing

Thanks.

Abhishek Katti

1 REPLY 1

Former Member
0 Kudos

hi

check this code

MODULE scroll INPUT.

XCODE = OK_CODE.
CASE xcode.

WHEN 'PGDO'. "one page down
offset = tabcontrl-lines - step_lines.
IF tabcontrl-top_line LT offset.
tabcontrl-top_line = tabcontrl-top_line + step_lines.
ENDIF.

WHEN 'PGUP'. "one page up
offset = step_lines.
IF tabcontrl-top_line GT offset.
tabcontrl-top_line = tabcontrl-top_line - step_lines.
ELSE.
tabcontrl-top_line = 1.
ENDIF.

WHEN 'PGLA'. " last page
tabcontrl-top_line = tabcontrl-lines - step_lines + 1.

WHEN 'PGFI'. " first page
tabcontrl-top_line = 1.

ENDCASE.

ENDMODULE. " SCROLL INPUT

regards

padma