disabled buttons

Ken Norris pixelbird at interisland.net
Thu Feb 26 17:44:40 EST 2004


Hi Thomas,

> Date: Thu, 26 Feb 2004 08:32:27 -0500
> From: Thomas McGrath III <3mcgrath at adelphia.net>
> Subject: Re: disabled buttons
> 
> Ken yeah that's what I did last time in SC. So I will do it again.
> 
> But for this project a disabled button does not do what a non-disabled
> button would do BUT if a user hits a disabled button it 'resets' the
> system of which buttons are available.
-----------
Disabled buttons don't receive physical mouse events, s you can't use the
button.
----------- 
> I should use the term available and non-available (since disabled in rev means
> dead) 
-----------
No, not dead, asleep. You can wake it up by enabling it at anytime.
-----------
> whereas my non-available buttons still have life in them ie. they reset
> the system.
-----------
Then you are saying you want a different altered state which is not
disabled. Is that what you mean?
-----------
> You see it is the nature of sequenced buttons that on a third hit of a
> sequence you decided to back out of the sequence you can just hit a
> non-available button to reset the system to be ready for a first hit
> again.
-----------
> Since I am combining two buttons in a group to get the look and feel I
> need I am thinking of adding a third invisible image to the group that
> when the icon is unavailable the image will trap the message.
-----------
My point is that you don't need to do that. Check the Icons and Border
properties in the button's inspector. There are 5 (count'em) possible button
states in Rev, each of which can have it's own icon.
------------
> Did you look at my buttons example?
> put this in the message box:
> 
> go URL "http://users.adelphia.net/~3mcgrath/Buttons.rev"
-----------
Yep, but for the life of me I cannot figure out why you can't set up a
button with different states to do what you want.

**Cute drawings, BTW.

If you don't want the rest of the script to execute, simply state a conditon
that does something else, or passes the mouseUp to a handler in the domain.

OTOH, any button automatically records if it has been clicked, and sets a
visitedIcon which tells the user it has been clicked a least once, then if
the user clicks it again:

if the visited of me then
  doWhatever
end if

If you just absolutely have to -- you could show a semi-transparent grc over
the button. It will block messages to the button and also be able to pass
its own.

HTH,
Ken N.



More information about the use-livecode mailing list