Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Button en-/disabling revisited

From: santilli:gabriele:g:mail at: 28-Aug-2007 8:16

2007/8/27, Kai Peters <kpeters-otaksoft.com>:
> disable: func[ butt [object!] flag [logic!]] [ > if all [ flag butt/user-data = gray ][ alert "gray" exit ] ; don't
user-data is not gray when disabled, it holds the original color. So, you need to check if face/color is gray (or face/colors/1). Of course this does not work if the button was gray in the first place, but I guess you're not doing that. HTH, Gabriele.