Let's say I have 3 textboxes, textbox 1, textbox 2 and textbox 3
Is there a way to setup a for loop to loop thru those 3 and copy each's text value to a List of the same number?
Say in Visual Basic, something like
For x = 1 to 3
MYArray(x) = Textbox(x).Text
Next x
I thought at first that was what Any Textbox was, with the component as the number, but I was wrong.
Thank you.
ABG
July 25, 2023, 1:31am
2
See screen2 of
lists.aia (16.6 KB)
1 Like
Thank you can't wait to look at it after work today.
Looks good, adapted to my app. I can now get Text value of a textbox by looking at its Index in the List.
Next question: How do I update the Text in a Textbox by referencing its Index in the List? Is that possible?
ABG
July 26, 2023, 3:08am
5
Using a variable to catch the result, select the textbox in the list of textboxes by index.
Take a block to update the .Text of a text box, and right click it to make it generic (or get it from the All Textboxes section of the Blocks pallette).
Use that block against the variable holding the text box component.
Sample app:
This week the US news networks have been reporting on a free web game by Josh Wardle called Wordle , similar to Jotto, developed as a personal project and open for all.
His variation has:
one chance to play per day
every one shares the same daily word
words have exactly 5 letters
you get six guesses
You are told
which letters match in place (green),
which letters match out of place (yellow)
which letters don't match anywhere (dark grey).
I decided to try to replicate his app in AI2 under t…