View Single Post
Old 02-07-2007, 11:22 AM   #4 (permalink)
Jinn
Lover - Protector - Teacher
 
Jinn's Avatar
 
Location: Seattle, WA
It's very difficult to transform a string into an array indexing command, which is what you're basically trying to do.

If all else fails, couldn't you just hard code it, since you only have 5 boxes?

Code:
if (variable1 == 1)
   variable2 = UVR_txt1.text
else if (variable1 == 2)
   variable2 = UVR_txt2.text
else if (variable1 == 3)
   variable2 = UVR_txt3.text
else if (variable1 == 4)
   variable2 = UVR_txt4.text
else if (variable1 == 5)
   variable2 = UVR_txt5.text
Sure, it's not the generic solution, but it works for five textboxes.
__________________
"I'm typing on a computer of science, which is being sent by science wires to a little science server where you can access it. I'm not typing on a computer of philosophy or religion or whatever other thing you think can be used to understand the universe because they're a poor substitute in the role of understanding the universe which exists independent from ourselves." - Willravel
Jinn is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76