Re: [flexcoders] How to enable the enter key for all buttons onFocus

2008-06-30 Thread dnk
On 27-Jun-08, at 10:57 PM, Alex Harui wrote: If you set a defaultButton on a container, ENTER will click it. If you tab to another Button, ENTER will click that other button. That’s the way Windows does it, and the way we do it in Flex. That is perfect. Works like a charm! d

RE: [flexcoders] How to enable the enter key for all buttons onFocus

2008-06-28 Thread Alex Harui
If you set a defaultButton on a container, ENTER will click it. If you tab to another Button, ENTER will click that other button. That's the way Windows does it, and the way we do it in Flex. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On

[flexcoders] How to enable the enter key for all buttons onFocus

2008-06-27 Thread dnk
Good day all, How would one go about enabling the enter key for all buttons in your flex app? I know you an do the defaultKey for a form, or add keyDown to your button (but that reacts to all keys then - not good). As it stands now, the spacebar will react to every button onFocus.. .I was

Re: [flexcoders] How to enable the enter key for all buttons onFocus

2008-06-27 Thread Josh McDonald
First a caveat: I's a bad idea. Pressing enter to submit an entire form and spacebar to click a specific button is a fairly standard UI practice, and something you shouldn't change without a good reason. But if you've got your heart set on it, one option is to subclass Button, put your code in