Hi List,
> -- Binary/unsupported file stripped by Ecartis --
> -- Type: text/x-rebol
> -- File: search1.r
>
>
> -- Binary/unsupported file stripped by Ecartis --
> -- Type: text/x-rebol
> -- File: window-editor1.r
>
seems like ecartis filtered out my attached files. I'll leave out my test file
too and just include my window-editor.r file.
Here it is :
rebol []
;---------------------------------------------------------------------------------------
; Carl S. demo was adapted below to add a HScrollbar - recipe 0029 from Cookbook
;---------------------------------------------------------------------------------------
out: layout [
across
h3 "Text Scrolling Example - Both vertical and horizontal" return
space 0
t1: text 600x300 green wrap black font-name font-fixed
s1: scroller 16x300 [scroll-tface-y t1 s1]
return
s2: scroller 600x16 [scroll-tface-x t1 s2]
pad 5x5 space 5x5
button "Open" [open-tface t1 s1 s2]
button "Store new content" [save-tface t1]
]
scroll-tface-y: func [txt bar][
txt/para/scroll/y: negate bar/data *
(max 0 txt/user-data - txt/size/y)
show txt
]
scroll-tface-x: func [txt bar][
txt/para/scroll/x: negate bar/data *
(max 0 txt/user-data - txt/size/x)
show txt
]
open-tface: func [txt bar1 bar2 /local file][
if file: request-file [
txt/text: read first file
reset-tface-y txt bar1
reset-tface-x txt bar2
]
]
reset-tface-y: func [txt bar][
txt/para/scroll/y: 0
bar/data: 0
update-tface-y txt bar
show [txt bar]
]
reset-tface-x: func [txt bar][
txt/para/scroll/x: 0
bar/data: 0
update-tface-x txt bar
show [txt bar]
]
update-tface-y: func [txt bar] [
txt/line-list: none
txt/user-data: second size-text txt
bar/redrag txt/size/y / txt/user-data
]
update-tface-x: func [txt bar] [
txt/line-list: none
txt/user-data: first size-text txt
bar/redrag txt/size/x / txt/user-data
]
view out
Regards
Gerard
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.