to add new letter to textbox i use
Textbox.Text = Textbox.Text + " ";
adds space etc., its simple
but i didnt figured out how can i delete last line
for examp.
text of textbox is abcdefg
and when user clicks delete, text is "abcdef" then "adcde"开发者_Python百科 etc.
how can i do this ?
i tried to search the web but i failed because i dont know how to search that such a thing ^^
String text = Textbox.Text;
if(!String.IsNullOrEmpty(text))
Textbox.Text = text.Substring(0,text.Length-1);
TextBox.Text = TextBox.Text.Remove(str.Length - 1, 1);
精彩评论