Identify button when clicked

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
Ivan Videsvall
Posts: 6
Joined: Thu Jul 09, 2020 9:36 am

Identify button when clicked

Post by Ivan Videsvall »

On a screen we have many buttons of the same kind. A click on any of these buttons should change a value, preferably in an a corresponding INT array. Is there a way to identify which button was clicked?

AMitchneck
Posts: 137
Joined: Mon Jun 11, 2012 2:10 pm

Re: Identify button when clicked

Post by AMitchneck »

There are multiple ways to identify the button. You can 1) attach action to each button that sets the corresponding tag or 2) hook click event to button and use scripting. For latter option, there are additionally 2 choices; 1) attach individual events per button and modify corresponding tag in each event or 2) attach all buttons to the same event and use sender argument to determine which button was pressed....
Adam M.
Controls Engineer
FlexEnergy

Ivan Videsvall
Posts: 6
Joined: Thu Jul 09, 2020 9:36 am

Re: Identify button when clicked

Post by Ivan Videsvall »

Option 2.2 seems to me the most appealing and is closest to what I had in mind. As you suggested an event can be hooked to an existing event handler.

Thanks!

Post Reply