It's more difficult then I thought. The next problem is that I want  to 
use this in a iterrated list. For every row in the list it has to be 
possible to chance the choice-buttons independent of each other, the 
data is comming from a database-block. I think I'am missing some copy 
statement somewhere. I tried several options but nothing is working.

The choice-buttons get changed but they are not working independent, 
only the first one. So there is some problem with sharing....

Thanks for any help.


rebol []
db: [
    ["1" "question 1 " ["true" "false"]]
    ["2" "question 2"  ["true" "false"]]
    ["3" "question 3"  ["true" "false"]]
]
offset: 0
db-size: does [length? db]

out: layout [
    text "list example"
    across
    mylist: list 640x480 [across t1: text 50 t2: text 200x40 para 
[wrap?: true] c1: choice "1" "2" ] supply [
        supply-data face count index
    ]
    sld: scroller 10x480 [offset: to-integer sld/data * db-size show mylist]
]


supply-data: func [face count index /local temp] [
    temp: count + offset
    either temp <= db-size    [

        switch index [
            1 [face/text: do to-path compose [db (temp) 1]]
            2 [face/text: do to-path compose [db (temp) 2]]
            3 [face/texts: do to-path compose [db (temp) 3] face/text: 
do to-path compose [db (temp) 3 1]]
            ;3 [face/texts: copy ["ja" "nee"] face/text: copy "ja" ]
        ]

    ]

    [face/text: none]

]


view out
rebol []


db: [
    ["1" "question 1 " ["true" "false"]]
    ["2" "question 2"  ["true" "false"]]
    ["3" "question 3"  ["true" "false"]]
]


offset: 0

db-size: does [length? db]


out: layout [
    text "list example"
    across
    mylist: list 640x480 [across t1: text 50 t2: text 200x40 para 
[wrap?: true] c1: choice "1" "2" ] supply [
        supply-data face count index
    ]
    sld: scroller 10x480 [offset: to-integer sld/data * db-size show mylist]
]


supply-data: func [face count index /local temp] [
    temp: count + offset
    either temp <= db-size    [

        switch index [
            1 [face/text: do to-path compose [db (temp) 1]]
            2 [face/text: do to-path compose [db (temp) 2]]
            3 [face/texts: do to-path compose [db (temp) 3] face/text: 
do to-path compose [db (temp) 3 1]]
            ;3 [face/texts: copy ["ja" "nee"] face/text: copy "ja" ]
        ]

    ]

    [face/text: none]

]


view out


Graham Chiu wrote:

>Hi Tim,
>
>Try this out ..
>
>view layout [=20
>  c1: choice "yes" "no"=20
>  button "change" [c1/texts: copy ["true" "false"] c1/text: copy
>"true" show c1]
>]
>
>On 9/5/05, Tim Hendriks <[EMAIL PROTECTED]> wrote:
>  
>
>>=20
>>Hi,
>>=20
>>I would like to chance the (dynamic) data property of the choice button
>>in view.
>>=20
>>Something like this:
>>=20
>>view layout [
>>             c1: choice "yes" "no"
>>             button [c1/data: ["true" "false"] ]
>>]
>>=20
>>But this is not working as I suspected. Can someone give me a hint?
>>=20
>>Thanks Tim
>>=20
>>--
>>To unsubscribe from the list, just send an email to
>>lists at rebol.com with unsubscribe as the subject.
>>=20
>>=20
>>    
>>
>
>
>--=20
>Graham Chiu
>  
>

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to