Are UI Controls Iterable?

Post Reply
bcgreen24
Posts: 13
Joined: Mon Oct 04, 2021 9:25 pm

Are UI Controls Iterable?

Post by bcgreen24 »

...can I do something like this pseudocode describes?

for(Slider s in Sliders){
doSomethingWith(s)
}

Thanks!
Bryan
ColinP
Posts: 1000
Joined: Mon Aug 03, 2020 7:46 pm

Re: Are UI Controls Iterable?

Post 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.
bcgreen24
Posts: 13
Joined: Mon Oct 04, 2021 9:25 pm

Re: Are UI Controls Iterable?

Post by bcgreen24 »

Thanks for the info!
Post Reply

Return to “Module Designer”