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

[REBOL] Re: How to simulate action on one button

From: carl::cybercraft::co::nz at: 24-Dec-2003 22:17

On 11-May-03, ronaldoff wrote:
> Hello Rebolers, > I'd like to get the same effect as if I had done a mouse click on > one button, but this "action" is originated from script itself. > How is that possible ?
The following shows a couple of ways to do this. It just depends on what you want... view layout [ b: button "Test" [print "Test pressed"] button "In" [b/state: true show b] button "Out" [b/state: false show b] a: button "Action" [ b/feel/engage :b 'down none b/feel/engage :b 'up none a/state: false show a ; Not sure why this line is needed... ] ] The "Action" button probably gives you the effect you want, but I'm not sure if it's the best way to do it. If the final line is missing the "Action" button itself stays down for reasons I don't understand, though it's maybe because it's sharing the engage function. Hope this is of some help, anyway. -- Carl Read