Default buttons OS X

Jim Ault JimAultWins at yahoo.com
Sun Apr 23 15:52:32 EDT 2006


On 4/23/06 12:26 PM, "Bill" <bill at bluewatermaritime.com> wrote:

> How come when you make a button a default button (on a card) using the
> property inspector it doesn't behave like a default button --- when you hit
> the return key the button does "push".
> 
> And how do you make it behave so?
> 
Consider that you make the button "default-style", not the default button.
You have the choice of using the default-style on several buttons on the
card, showing and hiding so that only one is visible at a time.  Using
multiple buttons would give you a flexible context sensitive user interface.

Of course, it would make sense to have all the of the default-style buttons
at the exact same location and shape, but that also can vary.

The key to Rev is messages and trapping them.
----In your case, try
on keydown

----or perhaps even
on rawkeydown

Both are in the docs.  This means you can trap all kinds of keys and
combinations, changing what they do on behalf of the user.

One of these should get to where you want to go.

Jim Ault
Las Vegas






More information about the use-livecode mailing list