Skip to Content
avatar image
Former Member

Capturing Scroll Event

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Sep 01, 2008 at 11:39 AM

    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

    Add comment
    10|10000 characters needed characters exceeded