Hi.
I am making a calculator.
I need a button that functions like a Backspace-button on a calculator. Erase the last inserted char, or what ever may work.
I use:
Button1
TextBox1
Thanks. :)
Printable View
Hi.
I am making a calculator.
I need a button that functions like a Backspace-button on a calculator. Erase the last inserted char, or what ever may work.
I use:
Button1
TextBox1
Thanks. :)
On hitting the button , rewrite the string with all charcters except length - 1 character.
TextBox1.Text = TextBox1.Text.Substring(0,TextBox1.Text.Length-1)
be sure to check the length of the text property first, if there's only 1 char than set the text equal to "0" instead of removing the char.