I had set up a button with a tab number, if a user tabbed to the button, instead of moving the mouse over to it and clicking, they could hit the enter key instead.
All of a sudden, my button has lost that ability. Where do I turn that feature on and off? Is it in the properties panel?
Hi Elyod,
Make sure you have the property ‘useFocus’ enabled.
And to be able to tab to it make sure it is in the tab sequence as well (tabSeq property)
Hope this helps.
I don’t see a property called ‘useFocus’.
I have one called ‘showFocus’ and that is checked, but when I tab to it, it still doesn’t allow me to hit the enter key in order to activate the onAction script. I have to physically click on the button to launch the script.
Which JVM, which OS?
I noticed this on Win2000 with certain JVM’s as well.
Paul
I am running Win XP with Java Version 1.5.0 (build 1.5.0_06-b05).
So you are saying that perhaps Java is the problem?
Have you changed your look and feel? I found that certian LAFs allow the Enter key to trigger a focused button’s onAction and some don’t. In my case, Default LAF works, Metal mostly doesn’t.
I am using Kunststoff with Kunststoff Desktop Theme.
elyod_72:
I don’t see a property called ‘useFocus’.
I have one called ‘showFocus’ and that is checked, but when I tab to it, it still doesn’t allow me to hit the enter key in order to activate the onAction script. I have to physically click on the button to launch the script.
Sorry about that. I meant showFocus.
And yes you can’t use the enter key it seems. But you can use the space key, but that might be a Mac thing.
I’m on mac OS X with default look and feel and when I use space key it works.
Can I change the space key and use enter key instead?
When I create a button, it doesn"t take the look and feel of MAC OS X but it seems to be the metal look and feel.
It is normal?
Hi Fabien,
Take a look at this.
When you set the height of the button to a specific pixel height you see the look of the button changing. This works only with the Mac OS X LAF.
Hope this helps.
GREAT !
Thanks