Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: Need help with modified request-list
Pages: [1] Print
Author Topic: Need help with modified request-list  (Read 176 times)
kpeters
Newbie
*
Offline Offline

Posts: 24


View Profile
Need help with modified request-list
« on: August 06, 2007, 07:24:32 PM »

Tried to marry Carl's article on adding scrollbars to request-list to add a horizontal scrollbar as well.

While it looks good it doesn't work. Clearly my understanding is limited!

Anyone can help?

TIA,
Kai

Code:

request-list: func [
    "Requests a selection from a list."
    titl [string!] alist [block!] listboxsize [pair!] /offset xy /local rslt list-lay ]
[
   reset-tface: func [txt bar][
        txt/para/scroll/x: 0
        bar/data: 0
        update-tface txt bar
        show [txt bar]
   ]
   scroll-tface: func [txt bar][
        txt/para/scroll/x: negate bar/data * (max 0 txt/user-data - txt/size/x)
        show txt
   ]
   update-tface: func [txt bar] [
        txt/line-list: none
        txt/user-data: second size-text txt
        bar/redrag txt/size/x / txt/user-data
   ]
   list-lay: layout [
        origin 10x10
        h3 titl
        space 0 ; hug the text box
        tl: text-list listboxsize font-name font-fixed data alist [rslt: value hide-popup]
        sb: scroller to-pair reduce [ first listboxsize 16 ] listboxsize [ scroll-tface tl sb ]
        reset-tface tl sb
        space 10x10
        btn-cancel #"^[" [rslt: none hide-popup]
    ]
    rslt: none
    either offset [inform/offset list-lay xy] [inform list-lay]
    rslt
]
Logged
Pages: [1] Print 
Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: Need help with modified request-list
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 05, 2008, 11:42:56 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2233 Posts in 581 Topics by 1855 Members
Latest Member: SmartCho

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc