thready
asked on
SelectionChanged event in textbox
Hi Experts,
Is there a way to handle the event of SelectionChanged right inside the control (in a derived class?) such as inside the derived class of MyRichTextBox (which derives from RichTextBox)?
Thanks,
Mike
Is there a way to handle the event of SelectionChanged right inside the control (in a derived class?) such as inside the derived class of MyRichTextBox (which derives from RichTextBox)?
Thanks,
Mike
ASKER
Hi Isaackhazi,
I'm using c# - how would I add the handler with C#?
Thanks,
Mike
I'm using c# - how would I add the handler with C#?
Thanks,
Mike
public event RoutedEventHandler SelectionChanged
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ahh, I was able to create the event handler in the form and then paste the code into my OnCreateControl within the derived class as needed. Thanks.
Public Event SelectionChanged As RoutedEventHandler
Visual Basic (Usage)
Dim instance As TextBox
Dim handler As RoutedEventHandler
AddHandler instance.SelectionChanged,
http://msdn.microsoft.com/en-us/library/system.windows.controls.textbox.selectionchanged(VS.95).aspx
from here