Hi Robert,
Here is a simple multilist column example. Hope it helps.
Cheers,
Allen K
REBOL [
Title: {Multi-column List demo}
Author: "Allen Kamp"
]
Data: [
[Left1 Middle1 Right1]
[Left2 Middle2 Right2]
[Left3 Middle3 Right3]
[Left4 Middle4 Right4]
[Left5 Middle5 Right5]
]
selected: row: 0
item: line: none
view layout [
style txt txt [if row [selected: row show lst]] 100
lst: list 300x300 [across space 0x0 txt txt txt] supply [
row: count
either line: pick data count [
item: pick line index
face/text: item
; color our columns
face/color: pick reduce [red blue green] index
; hilight selected row
if row = selected [face/color: gold]
][
; not a row with data set defaults
set-font face 'color black
face/color: snow
face/text: none
]
]
]
----- Original Message -----
From: "Robert M. Muench" <[EMAIL PROTECTED]>
To: "Rebollist" <[EMAIL PROTECTED]>
Sent: Thursday, February 14, 2002 6:00 AM
Subject: [REBOL] list: multiple columns update
> Hi, I'm trying to use a list with at least two columns and have the
following
> supply function in use:
>
> _supply: [
> ; do we have enough data?
> if count > length? project-list [face/show?: false exit]
> face/show?: true
>
> ; get project
> current-project: pick project-list count
>
> ; add stripes look to the list
> face/color: ivory
> if even? count [face/color: ivory - 50.50.50]
>
> ; change color if project is selected
> ### if current-project/selected [face/color: yellow]
>
> ; we use the current index to pick the entry from our object to display
> ; first current-project gives the list of fields in the object
> ; +1 skips the self reference
> field: pick first current-project index + 1
> face/text: current-project/:field
>
> ; store the project index into the predefined user-data field of the face,
> ; so that we can later access it
> face/user-data: count
> ]
>
> The line marked with ### should set the color of each column to yellow but
only
> the first column is displayed with a yellow background color. The other
columns
> change the color as soon as I click on the face. Why aren't the other
faces
> color get updated too?
>
> --
> Robert M. M�nch
> IT & Management Freelancer
> Mobile: +49 (0)177 2452 802
> Fax : +49 (0)721 8408 9112
> Web : http://www.robertmuench.de
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
>
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.