>>>>>>>>>>>>>>>>>> Urspr�ngliche Nachricht <<<<<<<<<<<<<<<<<<

Am 02.05.01, 13:10:02, schrieb Joel Neely <[EMAIL PROTECTED]> zum 
Thema [REBOL] BUTTON is odd widget out:


> As the following code demonstrates, BUTTON seems to be an antisocial
> little tyke who will get marks off in "plays well with others".  ;-)

> This raises two questions for me:

> 1)  Is this a bug or a "feature"?
> 2)  Are there any nice work-arounds?

1) feature (no quotes:) : pressed/unpressed texts available
2) yes, change face/texts/1 . 


[rebol []

a: get-style 'button
print "button-redraw:"
probe get in a/feel 'redraw

test2: make object! [
    counter: 0
    counter-text: to-string counter
    fix-text: func [thingie] [
thingie/text: copy counter-text ;better copy..
        show thingie
    ]
    the-head: the-text:
        the-vhead: the-vtext:
        the-field: the-info:
        the-button: the-label:
        the-recount: the-close: none
    uiSpec: [
        the-head:   h3      counter-text 50x20
        the-text:   text    counter-text 50x20
        the-vhead:  vh3     counter-text 50x20
        the-vtext:  vtext   counter-text 50x20
        the-field:  field   counter-text
        the-info:   info    counter-text
the-button: button counter-text "pressed" 
        the-label:  label   counter-text 50x20
        the-recount: button "Recount" [
            counter-text: to-string counter: 1 + counter
            fix-text the-head
            fix-text the-text
            fix-text the-vhead
            fix-text the-vtext
            fix-text the-field
            fix-text the-info
;fix-text the-button
the-button/texts/1: counter-text show the-button
            fix-text the-label
        ]
        the-close: button "Close" [unview]
    ]
    ui: layout uiSpec
    run: function [][][
        view center-face ui
    ]
]

test2/run
]

> -jn-

> 8<-------------------------------------------------------------------

> #!/usr/local/bin/rebol

> rebol []

> test2: make object! [
>     counter: 0
>     counter-text: to-string counter
>     fix-text: func [thingie] [
>         thingie/text: counter-text
>         show thingie
>     ]
>     the-head: the-text:
>         the-vhead: the-vtext:
>         the-field: the-info:
>         the-button: the-label:
>         the-recount: the-close: none
>     uiSpec: [
>         the-head:   h3      counter-text 50x20
>         the-text:   text    counter-text 50x20
>         the-vhead:  vh3     counter-text 50x20
>         the-vtext:  vtext   counter-text 50x20
>         the-field:  field   counter-text
>         the-info:   info    counter-text
>         the-button: button  counter-text
>         the-label:  label   counter-text 50x20
>         the-recount: button "Recount" [
>             counter-text: to-string counter: 1 + counter
>             fix-text the-head
>             fix-text the-text
>             fix-text the-vhead
>             fix-text the-vtext
>             fix-text the-field
>             fix-text the-info
>             fix-text the-button
>             fix-text the-label
>         ]
>         the-close: button "Close" [unview]
>     ]
>     ui: layout uiSpec
>     run: function [][][
>         view center-face ui
>     ]
> ]

> test2/run

> 8<-----------------------------------------------------------------
> --
> 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.

Reply via email to