Is there a way to make a list from interface items?

Hi!
I wonder, is there a way make a list from user interface items, like buttons or in my case canvas.
The point is, i want to call their functions by a variable, and if i could make a list from them i wouldn't make a lot of if statement for function calling. For example i have several canvas that i use for buttons. I select few of them, then i call a colorchange on the selected ones. Can i make it with a list somehow or i have to order an id to each of canvas and make a change by if statement on the ID?

Just use the runtime component block for each component (always at the bottom of the palette)
In this image for a button:

image

Drag these out and add them to a list.

You can then use the any component blocks after selecting an item from the list

image

Great.
Thank you!

One more question.
Can i get the touched button ID from the touched event somehow?
For example if i have 2 buttons "canvas" in a list. I touch one of them. If i call the any button "canvas" touched event, how do i know which one was touched?

I have this:
gombok|234x500
And i call this:
gombok2
How do i know whic one is touched?

Test the component block against your desired canvas component

I tried with object name, but now i see i can get back the list index. Thank you!

Here are a couple of samples for you ...

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.