same numeric 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
parsec
Posts: 27
Joined: Fri Jan 09, 2015 5:24 pm

same numeric button

Post by parsec » Tue Jan 20, 2015 2:28 am

I like to use same numeric buttons to enter values in different fields when the field is in focus. Also how to accomplish to enter number in the fields I understand the code below but if I need to enter 123 how do I do that thank you
on mouseUp
put "2" into field "number"
end mouseUp

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: same numeric button

Post by Simon » Tue Jan 20, 2015 3:03 am

Hi parsec,
Welcome to the forums!

Change "into" to "after"

Code: Select all

on mouseUp
put 2 after field "number"
end mouseUp
also you can drop the quotes around the number.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

parsec
Posts: 27
Joined: Fri Jan 09, 2015 5:24 pm

Re: same numeric button

Post by parsec » Tue Jan 20, 2015 12:12 pm

Thank you Simon
What I like to accomplish is this.
Build a Stack with 3 fields and 10 numeric buttons when a field gets focus I like to enter a numeric value from any of the 10 buttons
J

zaxos
Posts: 222
Joined: Thu May 23, 2013 11:15 pm

Re: same numeric button

Post by zaxos » Tue Jan 20, 2015 12:31 pm

Hello parsec.
If i understand correct this is what you need:

Code: Select all

on mouseUp
put 2 after the selectedField
end mouseUp
this code puts 2 after the field that is currently in focus :)
Knowledge is meant to be shared.

parsec
Posts: 27
Joined: Fri Jan 09, 2015 5:24 pm

Re: same numeric button

Post by parsec » Tue Jan 20, 2015 12:56 pm

thank's got it

Post Reply