Hello,
I program a user control which display a RichTextBox and a format
ToolStrip.
I want to process some shortcut keys.
The RichTextBox accepts tab.
Ctrl + I is supposed to format the selection in italic.
But Ctrl+I is also de code for Tab.
So when I press Ctrl+I, a tab is inserted (replacing the current
selection) AND the new selection is formatted in italic.
How can I do this ? Do I have to inherit first the standard RichTextBox
and override the OnKeyDown method ?

Signature
Fred
foleide@free.fr
Fred - 08 Mar 2008 14:05 GMT
Dans : news:eXL2QNSgIHA.4376@TK2MSFTNGP05.phx.gbl,
Fred disait :
> Hello,
>
[quoted text clipped - 9 lines]
> How can I do this ? Do I have to inherit first the standard
> RichTextBox and override the OnKeyDown method ?
Of course not, just have to set the SuppressKeyPress property of the
KeyEventArgs parameter to false !!!

Signature
Fred
foleide@free.fr