Skip to content

Instantly share code, notes, and snippets.

@dockimbel
Created September 8, 2022 14:29
Show Gist options
  • Save dockimbel/8a5bcf3acb470d0dd9f4dd0a07da7817 to your computer and use it in GitHub Desktop.
Save dockimbel/8a5bcf3acb470d0dd9f4dd0a07da7817 to your computer and use it in GitHub Desktop.
Simple usage example of SCROLLER widget
Red [Needs: View]
scroll-max: 100
start-pos: 0
view [
size 200x200
backdrop cyan
p: panel 100x100 [button "ok"]
do [start-pos: p/offset/y] ;-- saves initial position
sb: scroller 16x100 [
p/offset/y: to-integer start-pos + (scroll-max * face/data)
]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment