Move with tab on combo box
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 90
- Joined: Sun Feb 15, 2015 2:51 pm
Move with tab on combo box
I have text boxes and a combo box.
I have set the layers correctly so that with tab I move between the text in the order I want.
What I would like to do, which is not succeeding, is to move from a text on the combo and, maybe but not fundamental, to open the entries.
It can be done?
Thank you.
I have set the layers correctly so that with tab I move between the text in the order I want.
What I would like to do, which is not succeeding, is to move from a text on the combo and, maybe but not fundamental, to open the entries.
It can be done?
Thank you.
Re: Move with tab on combo box
What operating system are you using? Not all of them support tabbing to buttons by default. If the OS supports it, layer the button in the right order and it should work.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 90
- Joined: Sun Feb 15, 2015 2:51 pm
Re: Move with tab on combo box
That explains it then. Macs don't support tabbing to buttons by default. I think there's a system setting that will let you do that, but if your app will be distributed to others then it won't work for them.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Move with tab on combo box
I am missing something. I am on a Mac, and if there are three fields and a comboBox on a card, tabbing proceeds naturally through each field and the comboBox, round and round forever. The current text displayed in the combo is selected in its turn.
If, however, I select a menuItem from that ComboBox, LC places the cursor at the beginning of the text of the field. Hitting the tabKey will not then pass focus to the next field unless I physically place the cursor somewhere in the text by hand INCLUDING the very same place that LC did, that is, before the text. There is something different from the cursorLoc that LC sets upon selecting a menuItem from the cursorLoc that I set with my mouse.
Is this an edge case, Richard?
Again, once *I* set the cursor, even before the text of the field like LC does, tabbing works again, round and round.
Craig
If, however, I select a menuItem from that ComboBox, LC places the cursor at the beginning of the text of the field. Hitting the tabKey will not then pass focus to the next field unless I physically place the cursor somewhere in the text by hand INCLUDING the very same place that LC did, that is, before the text. There is something different from the cursorLoc that LC sets upon selecting a menuItem from the cursorLoc that I set with my mouse.
Is this an edge case, Richard?

Again, once *I* set the cursor, even before the text of the field like LC does, tabbing works again, round and round.
Craig
-
- Posts: 90
- Joined: Sun Feb 15, 2015 2:51 pm
Re: Move with tab on combo box
This is the problem, which does not work.
I tried creating a card with only fields and a combobox and with tab I move from the first to the last field but not on the combobox, after the last field we return to the first one.
From the property inspector I set the layers of the fields with increasing numbers (from 1 to 6) but the combobox has the number 1 and it is not possible to change it.
Is there a way to set the combobox layer number in sequence to the fields? For example between the penultimate and the last field?
I probably don't understand how layers work.
Re: Move with tab on combo box
Are you on a Mac?
Craig
Craig
Re: Move with tab on combo box
I played around tabkey and found a quick but dirty way to avoid combobox
Code: Select all
on tabkey
put the layer of the target into tLayerT
put the layer of btn "myCombo" into tAvoid
if tLayerT = tAvoid-1 then
if there is a control (tAvoid +1) and "field" is in the name of control (tAvoid +1) then
select text of control (tAvoid +1)
exit tabkey
else
select text of fld "f1"
end if
end if
pass tabkey
end tabkey
https://alternatic.ch
Re: Move with tab on combo box
From the images it looks a little like the button is an option button. Can you type into the field portion? If it's an option button the Mac will skip it. Apparently since a combo box has a field element it will act like a field in the tabbing order, which I didn't realize.
Layers are set in the Size and Location pane of the property inspector (the icon looks like a cross.)
Layers are set in the Size and Location pane of the property inspector (the icon looks like a cross.)
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Move with tab on combo box
You originally wanted to:
Or something just as peculiar.
Craig
So if is indeed an option button, without a field that LC can "see", as Jacque points out, then you have to kluge this. Perhaps (pseudo)maybe but not fundamental, to open the entries.
Code: Select all
on tabkey
if the layer of the target is the layer just below the layer of that option button then
click at the loc of thatOptionButton
Craig
Last edited by dunbarx on Mon Apr 08, 2019 5:11 pm, edited 3 times in total.
Re: Move with tab on combo box
Jacque.
What made you think it was an option button and not a combo? Was it that two tiny arrows were shown on the right, instead of one? That is knowing your LC trivia indeed.
Craig
What made you think it was an option button and not a combo? Was it that two tiny arrows were shown on the right, instead of one? That is knowing your LC trivia indeed.

Craig
Re: Move with tab on combo box
That, and also the size ratio and text alignment are slightly different.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 90
- Joined: Sun Feb 15, 2015 2:51 pm
Re: Move with tab on combo box
It's a combo.jacque wrote: ↑Mon Apr 08, 2019 4:32 pmFrom the images it looks a little like the button is an option button. Can you type into the field portion? If it's an option button the Mac will skip it. Apparently since a combo box has a field element it will act like a field in the tabbing order, which I didn't realize.
I checked better and realized that being a button in fact, which I already knew, and having two other classic buttons on the card, the combo is inserted in a layer of buttons only.
This button layer starts after the fields one.
What I would like to do is (having 6 fields)
ftab on first field --> 1 --> 2 --> 3 --> combo --> 4 --> 5 --> 6
Isn't that what you see in the screenshots I posted?
-
- Posts: 90
- Joined: Sun Feb 15, 2015 2:51 pm
Re: Move with tab on combo box
Thanks jmburnod.jmburnod wrote: ↑Mon Apr 08, 2019 2:09 pmI played around tabkey and found a quick but dirty way to avoid combobox
stTabKeyBehaviourAvoidComboBox.livecode.zipCode: Select all
on tabkey put the layer of the target into tLayerT put the layer of btn "myCombo" into tAvoid if tLayerT = tAvoid-1 then if there is a control (tAvoid +1) and "field" is in the name of control (tAvoid +1) then select text of control (tAvoid +1) exit tabkey else select text of fld "f1" end if end if pass tabkey end tabkey
I tried it and it only works in edit mode, but not in run mode
Re: Move with tab on combo box
Nope. You're on the "advanced" pane where you set behaviors and such. The number there is the number of the control (in order of creation) but not its layer.Isn't that what you see in the screenshots I posted?
The size and position pane looks like a cross, it's the fifth icon from the left. The bottom-most field is labelled "layer".
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com