Page 1 of 1

How to know which button is clcik

Posted: Fri Dec 14, 2012 8:39 am
by terryho
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

Re: How to know which button is clcik

Posted: Fri Dec 14, 2012 10:29 am
by dave_probertGA6e24
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

Re: How to know which button is clcik

Posted: Fri Dec 14, 2012 2:20 pm
by terryho
You are so lovely. It work.

Thanks a lot

Terry Ho