How to get button or label name as text format?

Hello. It is my first post and first question.


It looks like IF statement does not work. Only blocks after ELSE works.
I have another simple version that works but without IF and LOOPS statements.
I just wanted to do the same using DICTIONARY and it does not work.
Can you help a little?

You cannot treat a component as text. (as in contains text (get key))
You could however setup a dictionary with as key the name of the component (as text) and as value a list with two elements, the component and a number (FontSize)
Then in the for each… loop use the elements of the list to set the FontSize

And in this case I would setup different dictionaries for buttons and labels so that you could get rid of the IF structure

1 Like

Also see here:

MIT have tested a solution to provide the button component name, it may be coming in a future update, we will have to wait and see what the priorities are.

Thank you for your answers. I will try first sugested solution to have one dictionary and look how it will work.

You could also global init separate lists of labels and buttons, and determine component type using the is in list block.
Sample project:

Thank you. Also will try this.