'formatting' a Rebol text-list ??
[1/2] 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
]
[2/2] from: greggirwin::mindspring::com at: 24-Mar-2006 1:03
Hi John,
JD> ...and wondering if there are any features of text-list that would
JD> 'format' the (4) vertical columns on 'rigidly spaced' horizontal
JD> tabs or starting positions, which would 'beautify' the text-list
JD> presentation. Perhaps text-list is not the best approach?
The LIST style is great for that, but not quite as easy to use as a
TEXT-LIST; there is a demo on REBOL.org though. You might also check
out Henrik's LIST-VIEW style. It's very nice.
-- Gregg