How can i know the last change that the user did in the text in RichTextBox? Is there a function? Or I need to build to it a function?
相关问题
- Laravel Option Select - Default Issue
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
UpdatedChar
would contain the newly added character to the textbox1OldValue
would always contain the Old Value in the textbox1From your example : if my text is: "Text" and than I click 8 so the Text will be "Text8" so the char is 8.
UpdatedChar
=8 andOldValue
= TextIt provides an
event
calledTextChanged
. You'll need to define anEventHandler
and specify what is to happen, when the text changes.For example:
and now you need to add the eventhandler to the event like
Look here for documentation.
Add an event to your textbox. Select your textbox, go to properties, in event tab you will see different events. Find TextChanged event. Add that event to your code.
This function will trigger everytime textbox is changed. You can write your logic in that function.