Kill TextBox
-
I would like to delete two text fields on my form, however, these shall be not only removed but be deleted.
Is this possible?
I have a little code here but this doesn't work so.
Who can help me?private void button1_Click(object sender, EventArgs e) { //Kill the first TextBox textBox1.delete = true; }
Thank you so much.
thx Skypi
-
Removing the textbox from memory by yourself is not possible.
The only thing you could do is deleting all references to your textbox. The garbage collector will then free the memory.
-
Hi,
iàm not very sure what you exactly want, but if you want to hide them just use:
textBox1.Hide();
best regards
Tom
-
this.Controls.Remove(this.textBox1); this.textBox1 = null;
Should do the trick.
-
Thx so much.
I take that example from Konrad.this.Controls.Remove(this.textBox1); this.textBox1 = null;
Thank you so much for your help.
That so nice.
I love this corner. :schland:
Bye say Skypi