Thursday, 2 August 2012

Mouse scrolling wheel

Rebol GUI intercept scrolling wheel movement and if you press also CTRL it is a scroll-page event, look a this example:

Rebol []
insert-event-func   [
  switch event/type [
      scroll-line [b/para/scroll: b/para/scroll + event/offset]
      scroll-page [b/para/scroll: b/para/scroll + event/offset ]    
  show b    
view layout [
  text "You can scroll this text with mouse wheel and mouse wheel + CTRL"
  b: area system/license

No comments:

Post a Comment