[REBOL] 'formatting' a Rebol text-list ??
From: jfdutcher1958::yahoo::com at: 23-Mar-2006 17:55
The script below astounds me with its ease of
developing a neat scrollable text-list of what is
about 245 entries. I am comparing this to what was a
(4) column table using HTML/PHP......and wondering if
there are any features of text-list that would
'format' the (4) vertical columns on 'rigidly spaced'
horizontal
tabs or starting positions, which would 'beautify' the
text-list presentation. Perhaps text-list is not the
best approach?
Rebol[Title: "Test Case"]
port: open/seek %/c/vetssrc/dietsys/dsysmst.txt
read-record: func [port record-size record-number] [
copy/part at port record-number - 1 * record-size +
1 record-size
]
substr: func [record offset len] [
copy/part at record offset len
]
repeat i 299 [
rec1: read-record port 2690 i
sortBlock: []
y: 1
regnbr: substr rec1 y + 3 4
lname: substr rec1 y + 7 15
fname: substr rec1 y + 22 15
minit: substr rec1 y + 37 1
if (regnbr <> "XXXX") [
repend/only sortBlock [lname fname mold minit
regnbr]
]
]
view layout [
backcolor silver
h1 "Dietsys for the New York State Vets' Home"
h2 "Select from the list below by clicking one of the
residents' names"
listing: text-list 500x500 data sort sortBlock
]