[REBOL] Re: How to change an existing button's colour
From: ammon:johnson:gmai:l at: 30-Jan-2008 11:01
I'm a little suprised I was right. I haven't touched VID in 2 years.
My REBOL usage has moved entirely to back end server scripts...
On Jan 30, 2008 10:53 AM, Bob Warren <warren-howsoft.com> wrote:
> You've cracked it Kai!
> (All I've got to do now is to break my own head to analyze exactly how
> it works!)
>
> So near and so simple, Brock! Now if only we can get rid of the gradient
> effect ...
>
> You were right, Ammon: see Kai's solution.
>
> Thanks a lot, guys!
>
> Best,
>
> Bob
>
> Kai Peters wrote:
> > Here you go, Bob:
> >
> > The code also shows you how to dis-/enable a btn
> > as well in one go.
> >
> > HTH
> > Kai
> >
> >
> > ;------------------------------------------------------------------
> > disable: func[ butt [object!] flag [logic!]] [
> > if all [ flag butt/color = gray ][ exit ] ; don't disable twice
> > ;
> > either flag
> > [ butt/user-data: butt/colors/1
> > butt/colors: reduce [ gray gray ]
> > butt/color: gray
> > show butt
> > butt/feel: none
> > ]
> > [ butt/feel: svvf/btn
> > butt/color: butt/user-data
> > butt/colors: reduce [ butt/user-data butt/user-data ]
> > show butt
> > ]
> > ]
> >
> > ;-----------------------------------------------------------------
> > form: center-face layout [
> > btn-a: btn "Enable bottom button" [ disable btn-c false ]
> > btn-b: btn "Disable bottom button" [ disable btn-c true ]
> > btn-c: btn "Say hello" [ notify "Hi there!" ] sky colors [ sky sky ]
> > ]
> >
> > ;-----------------------------------------------------------------
> > view form
> > do-events
> >
>
> --
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
>
--
I contend that we are both atheists, I just believe in one less god
than you do. When you understand why you dismiss all other possible
gods, then you will know why I dismiss yours.
-- Stephen F. Roberts