Delete in Textbox
-
Hi All Is it possible to identify the character which gets deleted when the backspace is pressed in a Textbox. Regards Deepak.S
A way is to store the text in the Textbox, when ever the key is stroke. The next time key is up, compare the previous text with the current text. Another way is to catch the key down event. Check if it's a backspace, then get the last text in the current TextBox.
Work hard and a bit of luck is the key to success.
You don`t need to be genius, to be rich.
-
A way is to store the text in the Textbox, when ever the key is stroke. The next time key is up, compare the previous text with the current text. Another way is to catch the key down event. Check if it's a backspace, then get the last text in the current TextBox.
Work hard and a bit of luck is the key to success.
You don`t need to be genius, to be rich.
Hi What u say is right when the user is going to delete the text when the cursor is at the last positon.. what if he places the cursor at some other line in the richtextbox and then do a delete.. this where i am facing the problem how will i know what is he deleting.... i gotta identify that..
-
Hi What u say is right when the user is going to delete the text when the cursor is at the last positon.. what if he places the cursor at some other line in the richtextbox and then do a delete.. this where i am facing the problem how will i know what is he deleting.... i gotta identify that..
Before Delete the Text Box is
before
, after delete the Text Box isbefre
. The idea is to track this changes, compare the first char of both string, then compare the second, the the third, when you compare the fourth it's not a match, so there is a character deleted.:)
Work hard and a bit of luck is the key to success.
You don`t need to be genius, to be rich.