How do I get notified of a selection change in a text box in .NET 2.0? I was unable to find a SelectionChanged event or an OnSelectionChanged method. What is the best workaround for this (without having to PInvoke, of course)?
相关问题
- Carriage Return (ASCII chr 13) is missing from tex
- Generic Generics in Managed C++
- How to Debug/Register a Permanent WMI Event Which
- 'System.Threading.ThreadAbortException' in
- Bulk update SQL Server C#
You could use a RichTextBox and set Multiline to false. It has a OnSelectionChanged.
You can use TextBox also.
Write a funktion GetMyPosition() and put in the events
When you want to notify the highliting of a text, you also have to use - MouseHover()
Well, I guess this may help! You will need to use RichTextBox still.