clear textboxes that are found on toolstrips?

cjard

Well-known member
Joined
Apr 25, 2006
Messages
7,081
Programming Experience
10+
TechGnome said:
VB.NET:
        Private Sub ClearTextBoxes(ByVal ControlList As ControlCollection)
            For Each Ctrl As Control In ControlList
                If TypeOf Ctrl Is TextBox Then
                    Ctrl.Text = ""
                ElseIf Ctrl.HasChildren Then
                    ClearTextBoxes(Ctrl.Controls)
                End If
            Next
        End Sub

Nice bit of code! i shall change my recursive routine to use that! Thanks!

ps; i think neither your nor my code will clear textboxes that are found on toolstrips.. correct? for this, more code is needed
 
Back
Top