Jump to content

Rebol Programming/scroll-drag

From Wikibooks, open books for an open world

USAGE:

[edit | edit source]
SCROLL-DRAG face /back /page 

DESCRIPTION:

[edit | edit source]

Move the scroller drag bar

SCROLL-DRAG is a function value.

ARGUMENTS

[edit | edit source]
  • face -- the scroller to modify (Type: any)

REFINEMENTS

[edit | edit source]
  • /back -- move backward
  • /page -- move each time by one page

SOURCE CODE

[edit | edit source]
scroll-drag: func [
    "Move the scroller drag bar" 
    face "the scroller to modify" 
    /back "move backward" 
    /page "move each time by one page"
][
    any [
        all [back page move-drag face/pane/2 face/page] 
        all [back move-drag face/pane/2 face/step] 
        all [page move-drag face/pane/3 face/page] 
        move-drag face/pane/3 face/step
    ]
]