Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: multicolor-text / scrolling

From: brett:codeconscious at: 1-Jun-2001 22:53

I'm not sure of the finer points of scroll-para but this has an effect: some-text: {} for i 1 10 1 [ append some-text reduce [form system/locale/months newline] ] view layout [ across msg-area: area 400x100 copy some-text silver as-is sld: slider 16x100 [scroll-para msg-area sld] ] As for the other scrolling: ---Overview Put big-face inside small-face (in the sense of the Panel How-to). Small face becomes a "window" onto big-face in that you can only now see a part of big-face. The part of big-face you see depends on how much big-face is offset from small-face. To see the bottom of big-face you would want to offset big-face higher in relation to small face - and at maximum this would To see the top of big-face you would the offset to be 0. be the amount that big-face is taller than small-face. The only other thing is the size of the dragger in the slider - it should probably reflect the amount of data that you can see (1 = all, 0.25 = just a quarter) ---Example big-face: layout [ title "bay.jpg" image load-thru/binary ] view layout [ across small-face: box 200x50 green sld: slider 16x50 [ ; set the vertical offset to a proportion of the amount we cannot see big-face/offset/2: multiply sld/data (min 0 (small-face/size/2 - big-face/size/2) ) show small-face ] do [ ; put big-face inside small-face small-face/pane: big-face ; initialise the offset to 0x0 big-face/offset: 0x0 ; make the dragger indicate how much we can see sld/redrag min 1.0 divide 50 big-face/size/2 ] ] I haven't taken into account edges here - edges are included in the size of a face. Regards, Brett