Hello everybody,
I heard I could clear (or move spaces) to all controls at ones without
having to call each one of them. If someone remembers how to do that, I will
apreciate your help.
My scenario is a form where I have multiples groupboxes, and in each of
those groups i have text boxes, where users enter data. And I want to have
an option where the user can clear the controls in particular group at once.
And I do not want to be calling for each one of the controls for that
process.
I used to move spaces to each one of them like this:
text1.text = ""
text2.text=""
text3.text = ""
....
textn.text = ""
but there are a lot of controls in this application.
Thanks for any good suggestions.
Edd 7 3121
Eduardo78 wrote: Hello everybody,
I heard I could clear (or move spaces) to all controls at ones without having to call each one of them. If someone remembers how to do that, I will apreciate your help.
My scenario is a form where I have multiples groupboxes, and in each of those groups i have text boxes, where users enter data. And I want to have an option where the user can clear the controls in particular group at once. And I do not want to be calling for each one of the controls for that process. I used to move spaces to each one of them like this:
text1.text = "" text2.text="" text3.text = "" ... textn.text = ""
but there are a lot of controls in this application.
Thanks for any good suggestions.
Edd
For each Ctr as Control in GroupBox.Controls
Ctr.Text = ""
Next
This should work.
Chris
Eduardo,
Try this where "me" is your form:
Me.Controls.Clear()
Curtis
"Eduardo78" <Ed*******@discussions.microsoft.com> wrote in message
news:BD**********************************@microsof t.com... Hello everybody,
I heard I could clear (or move spaces) to all controls at ones without having to call each one of them. If someone remembers how to do that, I will apreciate your help.
My scenario is a form where I have multiples groupboxes, and in each of those groups i have text boxes, where users enter data. And I want to have an option where the user can clear the controls in particular group at once. And I do not want to be calling for each one of the controls for that process. I used to move spaces to each one of them like this:
text1.text = "" text2.text="" text3.text = "" ... textn.text = ""
but there are a lot of controls in this application.
Thanks for any good suggestions.
Edd
Thanks a lot Chris, it worked good, but it also cleared the labels on that
groupbox, how could I make it to clear just the textboxes?
"Chris" wrote: Eduardo78 wrote: Hello everybody,
I heard I could clear (or move spaces) to all controls at ones without having to call each one of them. If someone remembers how to do that, I will apreciate your help.
My scenario is a form where I have multiples groupboxes, and in each of those groups i have text boxes, where users enter data. And I want to have an option where the user can clear the controls in particular group at once. And I do not want to be calling for each one of the controls for that process. I used to move spaces to each one of them like this:
text1.text = "" text2.text="" text3.text = "" ... textn.text = ""
but there are a lot of controls in this application.
Thanks for any good suggestions.
Edd
For each Ctr as Control in GroupBox.Controls Ctr.Text = "" Next
This should work. Chris
Eduardo78 wrote: Thanks a lot Chris, it worked good, but it also cleared the labels on that groupbox, how could I make it to clear just the textboxes?
"Chris" wrote:
Eduardo78 wrote:
Hello everybody,
I heard I could clear (or move spaces) to all controls at ones without having to call each one of them. If someone remembers how to do that, I will apreciate your help.
My scenario is a form where I have multiples groupboxes, and in each of those groups i have text boxes, where users enter data. And I want to have an option where the user can clear the controls in particular group at once. And I do not want to be calling for each one of the controls for that process. I used to move spaces to each one of them like this:
text1.text = "" text2.text="" text3.text = "" ... textn.text = ""
but there are a lot of controls in this application.
Thanks for any good suggestions.
Edd
For each Ctr as Control in GroupBox.Controls Ctr.Text = "" Next
This should work. Chris
Blah... Ya, sorry about that...
For each Ctr as Control in GroupBox.Controls
if Typeof Ctr is TextBox then
Ctr.Text = ""
End if
Next
Curtis wrote: Eduardo,
Try this where "me" is your form:
Me.Controls.Clear()
Curtis
"Eduardo78" <Ed*******@discussions.microsoft.com> wrote in message news:BD**********************************@microsof t.com...
Hello everybody,
I heard I could clear (or move spaces) to all controls at ones without having to call each one of them. If someone remembers how to do that, I will apreciate your help.
My scenario is a form where I have multiples groupboxes, and in each of those groups i have text boxes, where users enter data. And I want to have an option where the user can clear the controls in particular group at once. And I do not want to be calling for each one of the controls for that process. I used to move spaces to each one of them like this:
text1.text = "" text2.text="" text3.text = "" ... textn.text = ""
but there are a lot of controls in this application.
Thanks for any good suggestions.
Edd
Um, that would remove all the controls from his form... That's not what
he is trying to do.
Chris
Thanks Curtis, but that command clears evething in the form. I just want to
clear the textboxes in a specific groupbox in the form.
Thanks,
Eduardo
"Curtis" wrote: Eduardo,
Try this where "me" is your form:
Me.Controls.Clear()
Curtis
"Eduardo78" <Ed*******@discussions.microsoft.com> wrote in message news:BD**********************************@microsof t.com... Hello everybody,
I heard I could clear (or move spaces) to all controls at ones without having to call each one of them. If someone remembers how to do that, I will apreciate your help.
My scenario is a form where I have multiples groupboxes, and in each of those groups i have text boxes, where users enter data. And I want to have an option where the user can clear the controls in particular group at once. And I do not want to be calling for each one of the controls for that process. I used to move spaces to each one of them like this:
text1.text = "" text2.text="" text3.text = "" ... textn.text = ""
but there are a lot of controls in this application.
Thanks for any good suggestions.
Edd
Thanks Curtis, but that command clears evething in the form. I just want to
clear the textboxes in a specific groupbox in the form.
Thanks,
Eduardo
"Curtis" wrote: Eduardo,
"Chris" wrote:
Curtis wrote: Eduardo,
Try this where "me" is your form:
Me.Controls.Clear()
Curtis
"Eduardo78" <Ed*******@discussions.microsoft.com> wrote in message news:BD**********************************@microsof t.com...
Hello everybody,
I heard I could clear (or move spaces) to all controls at ones without having to call each one of them. If someone remembers how to do that, I will apreciate your help.
My scenario is a form where I have multiples groupboxes, and in each of those groups i have text boxes, where users enter data. And I want to have an option where the user can clear the controls in particular group at once. And I do not want to be calling for each one of the controls for that process. I used to move spaces to each one of them like this:
text1.text = "" text2.text="" text3.text = "" ... textn.text = ""
but there are a lot of controls in this application.
Thanks for any good suggestions.
Edd
Um, that would remove all the controls from his form... That's not what he is trying to do.
Chris This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: kanones |
last post by:
Hi
I have a placeholder that has multiple controls that need to be loaded and
rendered to the user based on some user selections. I have to loop through
the choices that the user makes and then...
|
by: TT (Tom Tempelaere) |
last post by:
Hi there,
In my application I have a panel that contains a matrix of user controls.
The user control is fairly simple. It merely draws a circle that represents
an object in my code. The object...
|
by: Jeff Tolman |
last post by:
Hi!
I keep getting this error, but I'm not sure why. When I turn off the trace
flag, I only get it at certain times. Even with the trace flag set to true,
I don't understand the output...
|
by: Anders Borum |
last post by:
Hello!
I'm building pages dynamically, by loading usercontrols recursively and
adding the to eachother. My problem is usercontrols - defined with
output-caching directives. When these...
|
by: Bal Ghuman |
last post by:
Hi Guys
I've got an ASP.NET application that dynamically creates a navigation table
from an XML file and then Loads a user control according to which link has
been selected. The control...
|
by: PB |
last post by:
According to the documentation, ParseControl returns a parsed control from
an input string. The documentation seems to assume that *one* control will
be parsed from the string.
My implementation...
|
by: Nathan Sokalski |
last post by:
When I view any page in my application a second time, I recieve the
following error:
System.Web.TraceContext.AddNewControl(String id, String parentId, String
type, Int32 viewStateSize) +313...
|
by: imrosie |
last post by:
Hello,
Does anyone have a simple cmd to clear all controls on Subform without using the SetFocus? Two of the controls are expressions, so they can't be set to Null. Then after clear return control...
|
by: =?Utf-8?B?a3dvbmd0aw==?= |
last post by:
error message found in server A
"Multiple controls with the same ID 'batchEndorseworklist' were found. Trace
requires that controls have unique IDs."
but in server B is normal
why?
thank you
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |