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

[REBOL] Re: text-list questions (probably answered before)

From: carl:rebol at: 17-Apr-2001 12:21

It would probably be a lot easier to use a List rather than a text-list. Once you get the hang of a list, there's a lot more you can do with them. Here's example of a list... this one has alternating row colors. For data, it uses files in local dir. REBOL [ Title: "Example List" Date: 14-Mar-2000 Author: "Carl Sassenrath" ] cnt: 0 files: load %./ out: layout [ across image logo.gif text 233x24 bold middle no-wrap reform ["File List" now/date now/time] return space 0 txt snow black "Size" 77 center bold txt snow black "Time" 55 center bold txt snow black "File" 266 bold return lst: list 380x300 [ origin 0 space 0x0 across txt 75 center para [origin: margin: 0x2] txt 55 center para [origin: margin: 0x2] txt bold 240 txt 10 ] supply [ count: count + cnt face/color: ivory face/text: none face/font/color: black if even? count [face/color: ivory - 50.50.50] if none? file: pick files count [exit] face/text: do pick [ [either dir? file ["dir"][size? file]] [if date: modified? file [date/time]] [file] ] index ] sld: slider lst/size * 0x1 + 16x0 [ c: to-integer value * .5 * length? files if c <> cnt [cnt: c show lst] ] return ] view out -Carl