I have a GUI with up to 30 individual edit-fields. Is there a way to iterate over all of them if they share the same prefix name and an numeric ID? Is there an array object containing all of the items of a specific type?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a GUI with up to 30 individual edit-fields. Is there a way to iterate over all of them if they share the same prefix name and an numeric ID? Is there an array object containing all of the items of a specific type?
You can use the eval() function. If you have for example 2 line edits with the name UI_Line0 and UI_Line1 you can do this:
Last edit: Stefan Zieker 2024-01-19
Excellent! I knew eval from other languages, also there are more tricks in others for this. But in the end this works. Thank you mate!
np :-)
Just to have asked: Do you know an way to get all GUI elements programmatically? Maybe by their type?