|
-
Jan 15th, 2004, 10:49 AM
#1
Thread Starter
New Member
How to check for control existence?
I've got a form that builds a control array on a form, and later destroys some random controls from that array. Does anybody know how I can later check for the existence of a certain array member?
-
Jan 15th, 2004, 11:00 AM
#2
If you access some property of a control that doesn't exist, I would expect that you would get an error. There may be a better way to do this, but one possibility would be to write a brief function that takes a control as an argument and returns a boolean. The function would reference the property, and catch any errors generated. If the error indicates that the control doesn't exist, return false, if no error occurs, return true.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|