Silverfrost Forums

Welcome to our forums

How to update many small edit boxes at once?

25 Jul 2008 3:46 #3565

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.

25 Jul 2008 4:24 #3567

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

27 Jul 2008 3:22 #3581

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.

Please login to reply.