yo_daz_uk
asked on
Delete a text box
Hi,
Is it possibe to delete a textbox from a form programmtaically?
I was looking for something like
textbox1.remove
but could not find it.
Daz
Is it possibe to delete a textbox from a form programmtaically?
I was looking for something like
textbox1.remove
but could not find it.
Daz
yes, it's : textbox1.dispose
let me know if you have any problems.
let me know if you have any problems.
Yes sr101880 that is what I told yo_daz_uk to do.
sorry, your comment wasn't on my screen when I hit submit. No hard feelings. :-) yo_daz_uk , Please disregard my comment.
No problem sr101880 and you have a great day. ;=)
If you want to remove the textbox from the form but to use its properties anyway for any reason.
use:
Me.Controls.Remove(TextBox 1)
=> This line is valid if the textbox is placed on the form.
If it is placed on a panel or groupbox or any other container use that container's controls array
But if you want to delete the textbox not only from the form but also from the memory, then use the method that FernandoSoto and sr101880 propesed.
use:
Me.Controls.Remove(TextBox
=> This line is valid if the textbox is placed on the form.
If it is placed on a panel or groupbox or any other container use that container's controls array
But if you want to delete the textbox not only from the form but also from the memory, then use the method that FernandoSoto and sr101880 propesed.
ASKER
Thanks its in a hast table is the also a way to empty a hash table ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks fernado, i knew it was something basic i just couldnt find the answer!
TextBox1.Dispose()
Fernando