Download

Add buttons to array by name?

Hi,

How can i list buttons in widget?
I have 100 buttons, and want to make an array for them.
Or need to add manually all buttons?

Eyo,

It depends on what you want to do with the buttons.
I do not have time to show an example but you can, for example, use two widgets, one is a container, scroll box for example, and then a second widget is just a button. You can then on Widget Scrollbox construct have the array of buttons that are creating each button and assigning them to the container/scroll box.

Thank you. My buttons are in in scrollbox, i will try this.

If you have already manually added the buttons to the scrollbox, you can:

Ensure you flag the *scrollbox *as variable in the details panel - a tickbox at the very top.

If you’re dynamically spawning *custom *buttons and populating the scrollbox during run-time, you can, of course, skip casting and fill the array directly.

Good luck!

Thanks, my Scrollbox is static.

Run to the next problem:

My main scrollbox has child scollboxes inside. Can i get children’s children buttons somehow?

Yes, the same way you did before,

Scrollbox parent -> ForLoop (Scrollboxes) -> Get Button Array

Ohh, yes thanks.

No problems! :slight_smile: