Ability to tab out of a dropped option menu

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
MichaelBluejay
Posts: 233
Joined: Thu Jul 01, 2010 11:50 am

Ability to tab out of a dropped option menu

Post by MichaelBluejay » Tue Oct 08, 2019 11:19 am

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.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10315
Joined: Wed May 06, 2009 2:28 pm

Re: Ability to tab out of a dropped option menu

Post by dunbarx » Tue Oct 08, 2019 2:47 pm

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:

Code: Select all

on tabKey
   click at the loc of btn "yourOptionMenu"
end tabKey
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:

Code: Select all

on returnInField
   select text of fld 2
end returnInField
In the script of fld 2:

Code: Select all

on returnInField
   click at the loc of btn 1
end returnInField
And in the script of the option button:

Code: Select all

on menuPick
   select text of fld 1
end menuPick
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

MichaelBluejay
Posts: 233
Joined: Thu Jul 01, 2010 11:50 am

Re: Ability to tab out of a dropped option menu

Post by MichaelBluejay » Tue Oct 08, 2019 4:16 pm

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".

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10315
Joined: Wed May 06, 2009 2:28 pm

Re: Ability to tab out of a dropped option menu

Post by dunbarx » Tue Oct 08, 2019 6:47 pm

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

Post Reply