How to know which button is clcik

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
terryho
Posts: 126
Joined: Mon Nov 05, 2012 2:53 pm

How to know which button is clcik

Post by terryho » Fri Dec 14, 2012 8:39 am

Hi all,

I have many button in my stock. How to which button is clicked? I want to know the button ID and the label.

If the button is in a group, can I get which button is clicked with know the button ID and label.

Thanks in advance.

Regards

Terry Ho

dave_probertGA6e24
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 328
Joined: Mon Dec 05, 2011 5:34 pm
Contact:

Re: How to know which button is clcik

Post by dave_probertGA6e24 » Fri Dec 14, 2012 10:29 am

Hi,
Try:

Code: Select all

put the ID of the target into vButtonID
put the short name of the target into vButtonName
put the label of the target into vButtonLabel
"the target" is the object that has been clicked on - though it is not limited to only buttons - so you might want to filter out other clicks in your mouseUp/click handler.

Hope that helps.

Cheers,
Dave
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.

terryho
Posts: 126
Joined: Mon Nov 05, 2012 2:53 pm

Re: How to know which button is clcik

Post by terryho » Fri Dec 14, 2012 2:20 pm

You are so lovely. It work.

Thanks a lot

Terry Ho

Post Reply