focus to button

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

Post Reply
byg
Posts: 10
Joined: Fri Apr 12, 2013 6:33 pm

focus to button

Post by byg »

Hi,
I like to know if it is possible to change the ID number of a field. Here is the

reason why. I'm using TAB ON RETURN on some field entry and on the last entry I

would like the focus to go to a button that is not the next field. It seems that

TAB ON RETURN use the ID number to get to the next field, so if I could change

the ID number this would work. Or is there an easier way to do this?
TIA
byg
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: focus to button

Post by jmburnod »

Hi,
It seems that TAB ON RETURN use the ID number to get to the next field
I think that is the fld number and not the id of the fld

Here is a little stack with three flds and one btn

Best regards

Jean-Marc
Attachments
TabFldsAndHiliteBtn.livecode.zip
(1.2 KiB) Downloaded 521 times
https://alternatic.ch
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10502
Joined: Wed May 06, 2009 2:28 pm

Re: focus to button

Post by dunbarx »

Hi.

Could you:

Code: Select all

on tabKey
  doYourThing
end tabKey

on returnInField
   tabkey
end returnInField
Craig
SparkOut
Posts: 2984
Joined: Sun Sep 23, 2007 4:58 pm

Re: focus to button

Post by SparkOut »

The order in which controls are navigated on the card depends on the LAYER.
Focus on the lowest layered control (eg 1) and tab, it will go to the next higher layered control (eg 2).
Typically on creation each new control will have a sequentially higher layer, as well as a sequentially higher id, which is why you might have thought the id determined the order, as in your first post.
byg
Posts: 10
Joined: Fri Apr 12, 2013 6:33 pm

Re: focus to button

Post by byg »

Thanks all, I'll give it a try and get back
byg
byg
Posts: 10
Joined: Fri Apr 12, 2013 6:33 pm

Re: focus to button

Post by byg »

Thanks again guys, it works, hard to understand why but I'll read on it.
byg
Post Reply