View previous topic :: View next topic |
Author |
Message |
Little-Acorn
Joined: 06 Jul 2008 Posts: 111 Location: San Diego
|
Posted: Fri Jul 25, 2008 4:46 pm Post subject: How to update many small edit boxes at once? |
|
|
I have a program where nine unrelated variables are displayed, in nine small edit boxes, all in one window. There's a program running in the background, that occasionally changes one or more of them. I'd like to update them regularly. Presently I'm doing it with nine "update" statements in a row.
Is there a way to do it with one "update" statement?
And/or is there any real harm in using nine "update" statements like this? Looks tacky, but who's looking? Seems to work fine. |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2403 Location: Yateley, Hants, UK
|
Posted: Fri Jul 25, 2008 5:24 pm Post subject: |
|
|
There is no real harm in doing nine updates - the process is quick. Have you tried just updating one and seeing if the other 8 follow suit? (I'm never sure what happens).
If the variables were all of the same type, and stored in an array, you could do it in a loop, which is 3 statements not 9. You can always use EQUIVALENCE to give the array elements separate individual names.
Eddie |
|
Back to top |
|
 |
Little-Acorn
Joined: 06 Jul 2008 Posts: 111 Location: San Diego
|
Posted: Sun Jul 27, 2008 4:22 am Post subject: |
|
|
Thanks, Eddie. I don't really care how a program looks, as long as it is fairly easy to debug and runs smoothly. And this does! I appreciate the feedback. |
|
Back to top |
|
 |
|