I’ve been searching for a couple days on how this might be possible and I am starting to think that it is NOT.
In short: I want a number of text boxes to appear on a widget based on a number input field. I don’t know the number of text boxes that may be created as it could be very high (100’s).
Is there a way to add a child to a widget without having first made something to add to it? Can I create a “template” child widget component and have that be created over and over again with a new ID?
I will also need to be able to read the values of all these input fields after they have been created and I’m not clear on how I would do that.
I was working on something similar and based on your explanation here is what i have done in the screenshot. however, now when the children are added it isn’t adding all of them or adding the number i am expecting…
for instance when i want to add 4 boxes it just adds three… i think its not counting the zero index?
for anyone who is having problems with this as i am heres how to correctly create an array with a desired index size…
you need to use RESIZE node…
this allows you to have an array valuable with a starting number of index items of 0
then you can resize it based on a value you determined elsewhere (in this case its a spin box for me)
then like in my case you can run a for each against that newly resized array
I would have put the Create Widget node inside of the For loop, not before. It’s weird to me that your setup works, because you’re referencing the same created widget instance multiple times and adding that same widget instance to your list multiple times.
I was under the impression you would need to create a new widget as many times as you want to add it, but it looks like the Add Child node either creates those instances itself, or I misunderstood the system.