Escape key to dismiss dialogs
Bill Vlahos
bvlahos at mac.com
Tue Feb 27 21:05:44 EST 2007
Neat solution.
I think I'll limit to just the "Cancel" button because I don't want
the user to close the stack if they press escape in the normal window.
Thanks Dave.
Bill Vlahos
On Feb 27, 2007, at 12:06 AM, Dave Cragg wrote:
>
> On 27 Feb 2007, at 05:56, Bill Vlahos wrote:
>
>> It is common for dialog boxes to cancel when the user presses the
>> Esc key. Unfortunately when I press the Esc key on an ask dialog
>> it simply enters something in the field.
>>
>> Is this a bug? How do I get the desired behavior?
>
> One way I've handled this is to put the following handler in the
> stack script of the main stack.
>
> on escapeKey
> if there is a button "Cancel" then
> click at the loc of button "Cancel"
> else if there is a button "Close" then
> click at the loc of button "Close"
> end if
> end escapeKey
>
> Cheers
> Dave
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list