|
-
Feb 25th, 2003, 06:48 AM
#1
Thread Starter
Addicted Member
For Each loop [RESOLVED]
First I'd like you all to know that I tried to use the search, but it's clearly offline, since it doesn't give me any result at the time I'm writting this.
Now, I have about 8 textboxes inside a tab control wich is inside a panel. What I'd like to do is a procedure that clears the text in all the textboxes. In VB 6 it's really simple and intuitive, but in VB.Net I really can't understand it. I can't understand the Studio help either.
So could anyone post the little code needed to automate the txtBlablabla.Text = "" instruction?
Oh, the textboxes aren't as in an array.
I'm a bit ashamed to ask for help for such a simple task, but I already lost 3 hours with this.
Last edited by Zealot; Feb 25th, 2003 at 03:13 PM.
-
Feb 25th, 2003, 10:53 AM
#2
Thread Starter
Addicted Member
What the hell... no one has worked with collection controls in vb.net before?
-
Feb 25th, 2003, 10:55 AM
#3
Member
Hi
Will this help?
Dim ctrl As Control
For Each ctrl in Me.TabControl1.TabPages(0).Controls
If TypeOf(ctrl) Is TextBox Then
ctrl.Text = ""
EndIf
Next
Harold Hoffman
-
Feb 25th, 2003, 11:19 AM
#4
Thread Starter
Addicted Member
Hey it did, thanks a lot!
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
|