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

[REBOL] Re: Layout too big for it's window

From: james:mustard at: 7-Dec-2001 12:56

Here is another example which uses image icons in the list/table - also it sets the pane face colour as well as item back colours. context [ ;- The database tdata: [ [%1.png "Adamson" "Sarah" 0] [%2.png "Adamson" "John" 1] [%1.png "Battey" "Nora" 0] [%2.png "Roberts" "Julia" 1] [%2.png "Spencer" "Frank" 1] ] ;- For the scroll bar cnt: 0 view layout [ across space 0 tbl: list 250x400 [across space 0 image 23x23 effect [fit] text 100 text 100 check [tmp: (face/parent-face/offset/y / face/parent-face/size/y) + 1 print face/parent-face/size if tmp <= length? tdata [tdata/:tmp/3: either tdata/:tmp/3 = 1[0][1]]]] supply [ count: count + cnt face/color: ivory face/text: none if even? count [face/color: ivory - 50.50.50] if not none? face/parent-face [face/parent-face/color: face/color] face/data: false face/image: none if none? v: pick tdata count [exit] switch/default face/style [ check [ face/data: to-logic (pick v index) ] image [ face/image: load pick v index ] ][face/text: pick v index] ] sld: slider 16x400 [ c: max 0 to-integer (length? tdata) * value if c <> cnt [cnt: c show tbl] ] return ] ] Regards, James.