Re: Clear all TextBox on a Form



No, there isn't. You will have to cycle through all the textboxes on
the form, and then clear the text out yourself. It should be easy enough to
do, given a ControlsCollection instance, you can use the "as" operator to
determine if the control is a TextBox or not (or, TextBoxBase). If it is,
then you can set the Text property to an empty string.

--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx

"RP" <rpk.general@xxxxxxxxx> wrote in message
news:1187119751.419037.247560@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I want to clear all the Text Boxes on the Form. Is there any short
method to avoid clearing them one by one.



.



Relevant Pages

  • Dynamically Select Control to Edit
    ... On clicking the button I want to cycle through the textboxes and change the '.text' value to the name of the textbox... ... Dim strFieldName As String ... I've come up with a method in which I cycle through all the controls on the form and look for the one with the same name as strFieldName then amend it's .text value but that just seems like a really poor way of doing it. ... From: Alex Battye ...
    (microsoft.public.dotnet.languages.vb.controls)
  • Re: subplot() clearing textbox annotation
    ... I have had it cycle again. ... (not clearing the textboxes) ... and then reverting back to the ...
    (comp.soft-sys.matlab)

Loading