Page 1 of 1
Are UI Controls Iterable?
Posted: Mon Oct 04, 2021 9:28 pm
by bcgreen24
...can I do something like this pseudocode describes?
for(Slider s in Sliders){
doSomethingWith(s)
}
Thanks!
Bryan
Re: Are UI Controls Iterable?
Posted: Tue Oct 05, 2021 12:54 pm
by ColinP
Unfortunately there's no Voltage Modular API mechanism to iterate through components or navigate through parent/child hierarchies.
You have to DIY by saving references in an array or other collection, either by explicit references to the variable name set in the properties of components added using the designer tool or programmatically if you use the AddComponent() or AddChildComponent() methods to instantiate your own components.
Re: Are UI Controls Iterable?
Posted: Tue Oct 05, 2021 1:51 pm
by bcgreen24
Thanks for the info!