When an option menu is dropped/open, I'd like the ability to tab out of it, or at least have it respond to the on tabkey message.
I'm creating a data entry app where the user tabs from field to field. When getting to the option menu, it drops, but if the user wants to use the value that's already there and just tab out of it, s/he can't. S/he has to hit the Return key, which is jarring after hitting the tab key several times in a row: s/he might do: TAB TAB TAB TAB TAB but then suddenly TAB doesn't work and s/he has to switch to Return.
Ability to tab out of a dropped option menu
Moderator: Klaus
-
- Posts: 233
- Joined: Thu Jul 01, 2010 11:50 am
Re: Ability to tab out of a dropped option menu
Hi.
In normal tabbing among fields, an option menu button would not "naturally" follow in that process. One could certainly, in the script of any particular field:
That will "open" the option menu. Is that how you did it?
But that button does not receive tabKey messages, and only responds to mouseClicks and the "menuPick" message, which can be invoked with return or enter. (Maybe some others?).
So how about rethinking from scratch? Make two fields and an optionKey button. In the script of fld 1:
In the script of fld 2:
And in the script of the option button:
Works. Is a kluge and a half. Requires your users to use the return key (you could do it with the enter key) instead of the "normal" tab key. If that is a deal killer, I am not sure how to advise you.
Craig
In normal tabbing among fields, an option menu button would not "naturally" follow in that process. One could certainly, in the script of any particular field:
Code: Select all
on tabKey
click at the loc of btn "yourOptionMenu"
end tabKey
But that button does not receive tabKey messages, and only responds to mouseClicks and the "menuPick" message, which can be invoked with return or enter. (Maybe some others?).
So how about rethinking from scratch? Make two fields and an optionKey button. In the script of fld 1:
Code: Select all
on returnInField
select text of fld 2
end returnInField
Code: Select all
on returnInField
click at the loc of btn 1
end returnInField
Code: Select all
on menuPick
select text of fld 1
end menuPick
Craig
-
- Posts: 233
- Joined: Thu Jul 01, 2010 11:50 am
Re: Ability to tab out of a dropped option menu
I know there are kludgy ways to do it (like building a field that looks and works like an option menu, but which will respond to on tabkey, because it's a field), but I don't want to do it the kludgy way, which is why I submitted this as a feature request.
LiveCode is supposed to be easy. That's how it's marketed. It's not marketed as "kludgy".
LiveCode is supposed to be easy. That's how it's marketed. It's not marketed as "kludgy".
Re: Ability to tab out of a dropped option menu
LC does not have everything built in. Nothing does.
But go for it. There can be little to be said against having an option button respond to more messages than it does already. That might be the only "feature" you need to request.
Craig
But go for it. There can be little to be said against having an option button respond to more messages than it does already. That might be the only "feature" you need to request.
Craig