Access name of component instance

I am trying to get the name of a component instance. When I have a simple widget I can get its name by:
Set Text
myWidget to “[[This.name]]”

But when I assign this onClick script to a component instance, the text assigned is empty, although the instance has a name.
Is there a way to get the name of a single instance?

Thanks in advance for any hint!

Not really. Since a component instance isn’t a “real” widget, the “This” will always refer back to the original widget inside the component.

The best thing I can think of to do is wrap the component instance in a group, name the group, and use it as the “This” for your logic.

1 Like

Ah, cool idea, thank you!