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

[REBOL] Disabled buttons

From: kpeters::otaksoft::com at: 7-Aug-2007 22:01

In reply to one of my posts on RebolTalk Gabriele had recommended to a) change the gradient of disabled buttons b) turn the action off While this still displays the click action, it's good enough for now. Since my app will have lots of buttons, I will need a function for this: My non-working "prototype" is show below; I vaguely remember reading about /userdata somewhere but I need help with the storage part of the code. Thanks, as always, for any help Kai toggle-button: func[ thebtn [object!] flag [logic!]] [ either flag [ thebtn/action: first thebtn/userdata thebtn/effect/3: second thebtn/userdata ] [ thebtn/userdata: [ thebtn/action thebtn/effect/3 ] ; store these two values so we can retrieve them thebtn/action: none thebtn/effects/3: 0.0.0 ] ; now "disable" the button show thebtn ]