I'm working on a project that uses a RichTextBox. My project required me to make use of bold/italics/underline/colour/etc. To handle all of this, I downloaded a custom application from the Internet, "RicherTextBox".
This new control works well for formatting text, however events like KeyDown, KeyUp don't work. Other events that were present in RichTextBox like LinkClicked are missing.
Since I have the code for RicherTextBox, I can customize it as desired.
How can I make KeyDown, KeyUp work like it does for RichTextBox?
How can I add missing events like LinkClicked?
That entirely depends on what's going on inside that RicherTextBox
control. Does it just extend the regular RichTextBox
control? They could be intercepting and handling events. You'll have to check out the source code to be sure.
See if they're subscribing to the KeyDown
and KeyUp
events. There's a Handled
property on the KeyEventArgs
parameter for those events. If they set e.Handled = true
, it'll prevent the event from going any further up the chain.
I don't see a Handled
event in the LinkClickedEventArgs
that's passed to the LinkClicked
event, so I'm not sure. You'll have to dig into the source code.