devxlogo

Text Box and an Array

Text Box and an Array

Question:
I opened a ASCII text file into an array. Now I want to print the data into a text box. I tried something like this: txtResult.text = flight(i)

The problem is that if there are 5 rows in the array, the text is overwritten 5 times, so all you see in the text box is the last result from the array.Any ideas?

Answer:
Try using the code below instead. That should solve your overwriting problem.

for i=0 to ubound(flight)  txtResult.text=txtresult.text & flight (i)next i
See also  Comparing different methods of testing your Infrastructure-as-Code
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist