Rebol Talk Forum  |  REBOL Discussions  |  REBOL View  |  Topic: Disabled buttons?
Pages: [1] Print
Author Topic: Disabled buttons?  (Read 424 times)
kpeters
Newbie
*
Offline Offline

Posts: 24


View Profile
Disabled buttons?
« on: August 01, 2007, 06:32:16 PM »

Hi ~

is it possible to disable buttons? If not, what is an easy way to convey button states to the user?

TIA,
Kai
Logged
Sunanda
Full Member
***
Offline Offline

Posts: 100


View Profile
Re: Disabled buttons?
« Reply #1 on: August 02, 2007, 07:31:45 AM »

Disable a button by changing its action facet.
You could show that by changing the color of the button (or other effects):

Code:
  active: does [print "b1 pressed"]    ;; function for active button
  inactive: none                             ;; action for diasbled button

view layout [
    b1: button "B1"
       [active]              ;; default action facet of active
 
    b2: button "b2" [
       b1/action: inactive    ;; set b1 inactive if pressed
       b1/effect/3: 0.0.0    ;; change b1's color gradient effect
       show b1                   ;; rerender b1
   ]
]
Logged
Pages: [1] Print 
Rebol Talk Forum  |  REBOL Discussions  |  REBOL View  |  Topic: Disabled buttons?
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 07, 2008, 10:57:37 AM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2241 Posts in 585 Topics by 2232 Members
Latest Member: ThortHoTeMorY

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc