Pop-up Menu and Tab Key

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

MrAlobar
Posts: 70
Joined: Mon Dec 08, 2014 6:42 pm

Pop-up Menu and Tab Key

Post by MrAlobar » Mon Mar 18, 2019 5:23 pm

Anyone encountered and solved this one - it must have been encountered before (which makes me think I am missing something really obvious !) ...

With a pop-up menu open, using the tab key highlights menu items sequentially - great.
But, the other items on the card are simultaneously highlighted (with traversal on of course)!

I've been using Livecode for a few years and usually code my own pop-up menus but today I wanted to do a fast build of a prototype - unfortunately I've got side-tracked on this problem.

I've tried several work-arounds - the obvious one is to turn off traversal for all other objects whilst the menu is open - a cumbersome and ugly solution though.

Or am I missing something ?
I've Created it with Live Code, I've published it - that's the easy bit done, but how the hell do I get people to download it :?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Pop-up Menu and Tab Key

Post by dunbarx » Mon Mar 18, 2019 6:07 pm

With a pop-up menu open, using the tab key highlights menu items sequentially - great.
But, the other items on the card are simultaneously highlighted (with traversal on of course)!
Huh? I don't see this, either with just the menuItems displayed raw, or with the cursor drawn down to one of them so that one menuItem is hilited. The tabKey does nothing.

I have a few other fields on the card. As long as the menuItem list is displayed, the tab key does not navigate from one field to another.

Craig Newman

MrAlobar
Posts: 70
Joined: Mon Dec 08, 2014 6:42 pm

Re: Pop-up Menu and Tab Key

Post by MrAlobar » Mon Mar 18, 2019 6:26 pm

Hi Craig,
Mmm odd.

I've just created a clean stack and the behaviour is immediate - just a field and some buttons (traversal on) and a pop-up menu), no code.

Behaviour translates to the Windows standalone too.

Jay

.. stack attached
Attachments
TabKeyBehaviourWithPopUpMenu.zip
(4.93 KiB) Downloaded 189 times
I've Created it with Live Code, I've published it - that's the easy bit done, but how the hell do I get people to download it :?

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Pop-up Menu and Tab Key

Post by jmburnod » Mon Mar 18, 2019 7:24 pm

Hi Jay,
not sure I understand what you mean
I tried your stack (LC 9.01, OSX 10.13)
I can choose a menuitem with arrows keys up/down
Tabkey select fld 1 as expected but nothing more
Best regards
Jean-Marc
https://alternatic.ch

MrAlobar
Posts: 70
Joined: Mon Dec 08, 2014 6:42 pm

Re: Pop-up Menu and Tab Key

Post by MrAlobar » Mon Mar 18, 2019 7:46 pm

Hi Jean-Marc,
If you click the pop-up menu so it drops, and then use the tab key to move up and down the menu, the objects on the card are also tabbed through - simultaneously.

I created a standalone and that behaves the same way.

The behaviour I expected (and would like) was for the tab key to navigate the objects on the card whilst the pop-up is closed, and to navigate the menu items of the pop-up whilst it is open, but cease navigation of the objects on the card, and to then revert on closing of the pop-up.

PS LiveCode 9.02 on Windows 10
Last edited by MrAlobar on Mon Mar 18, 2019 8:14 pm, edited 1 time in total.
I've Created it with Live Code, I've published it - that's the easy bit done, but how the hell do I get people to download it :?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Pop-up Menu and Tab Key

Post by dunbarx » Mon Mar 18, 2019 8:03 pm

Jay.

I opened your stack, clicked on the menu button and saw the menuItem list open. Pressing the tab key at that time did nothing, as it also did not in the test stack I made.

Your stack has only one field, so with the menu button in its normal state, tabbing simply gives that field focus, and tabbing again, since it is the only field, seems to do nothing, leaving focus in the field, though it probably just re-selects that same field again.

Did I do this in the same way you expected?

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Pop-up Menu and Tab Key

Post by dunbarx » Mon Mar 18, 2019 8:04 pm

Jean-Marc makes a point.

We are talking about the TAB key, and not an arrow key, right?

Craig

MrAlobar
Posts: 70
Joined: Mon Dec 08, 2014 6:42 pm

Re: Pop-up Menu and Tab Key

Post by MrAlobar » Mon Mar 18, 2019 8:35 pm

Yes TAB key.

On my system, I do this...
1. click the menu button, menu drops
2. press Tab Key, 1st item is highlighted, and field receives focus
3. press Tab Key, 2nd item is highlighted, and button 1 receives focus
4. press Tab Key, 3rd item is highlighted, and button 3 receives focus
5. press Tab Key, 4th item is highlighted, and button 2 receives focus
6. press Tab Key, 5th item is highlighted, and the pop-up menu button receives focus
7. press Tab Key, 1st item is highlighted, and field 1 receives focus
etc.

(The pattern repeats as there are five menu items and five objects, otherwise of course it would be out of step as it goes around again.)

It appears that the objects are receiving focus first and then the menu item, as the target of the return key is always the menu item (when menu is open).

I will attempt to make a video if it will help. I'm starting to wonder if I have something peculiar in my set-up - although whatever it might be is coding into the exe as the application behaves this way too.
I've Created it with Live Code, I've published it - that's the easy bit done, but how the hell do I get people to download it :?

MrAlobar
Posts: 70
Joined: Mon Dec 08, 2014 6:42 pm

Re: Pop-up Menu and Tab Key

Post by MrAlobar » Mon Mar 18, 2019 9:07 pm

Jean-Marc..
Tabbing from the field should shift focus to the next object - i.e. button 1. Did you have traversal-on for the buttons in your stack ? It's not on by default. Without this the tab would simply highlight the field and not tab across the buttons.

My stack has traversal-on for the buttons as I am trying to give the user the ability to navigate by tab key (and execute by return key).
I've Created it with Live Code, I've published it - that's the easy bit done, but how the hell do I get people to download it :?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Pop-up Menu and Tab Key

Post by dunbarx » Mon Mar 18, 2019 9:19 pm

Jay.

I get none of that. Could be me, could be you. I am on a Mac, OS 10.13.4, LC v. 8.1.10.

Craig

MrAlobar
Posts: 70
Joined: Mon Dec 08, 2014 6:42 pm

Re: Pop-up Menu and Tab Key

Post by MrAlobar » Mon Mar 18, 2019 9:56 pm

Thanks Craig.
I'm going to test it on some older versions of LC.
I've Created it with Live Code, I've published it - that's the easy bit done, but how the hell do I get people to download it :?

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Pop-up Menu and Tab Key

Post by bogs » Mon Mar 18, 2019 10:09 pm

I'll get the popcorn and wait on the video
Image
Image

MrAlobar
Posts: 70
Joined: Mon Dec 08, 2014 6:42 pm

Re: Pop-up Menu and Tab Key

Post by MrAlobar » Mon Mar 18, 2019 11:04 pm

LC 8.1.10 Same result.
I made a video but it's too large to post here (800k).
I'll share it on OneDrive is you think it'll help.

I'm baffled as to why I'm getting this result and you guys aren't.

Anyway, I'll go back to making my own pop-up menus as I need to get the job done - shame to have to though.
I've Created it with Live Code, I've published it - that's the easy bit done, but how the hell do I get people to download it :?

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Pop-up Menu and Tab Key

Post by jmburnod » Mon Mar 18, 2019 11:26 pm

Jay
Did you have traversal-on for the buttons in your stack ?
Yes. I used your stack
https://alternatic.ch

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Pop-up Menu and Tab Key

Post by dunbarx » Tue Mar 19, 2019 3:48 am

Jean-Marc.

What do you suppose is going on with him? I have no theories. We both used his stack unchanged.

Some OS environmental difference?

Craig

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”