I created a richTextBox and i noticed that when I press Tab key it is not doing anything. It is suppose to do some space but it do not.
How can i access it?
I created a richTextBox and i noticed that when I press Tab key it is not doing anything. It is suppose to do some space but it do not.
How can i access it?
By default pressing tab moves focus to the next control. Setting AcceptsTab property of the RichTextBox to true
allows the RichTextBox to accept tab characters.
See this MSDN article on the AcceptsTab property.
First you need to set following properties of Richtextbox
richTextBox.Multiline = true;
richTextBox.AcceptsTab = true;
And in the keypress event of richtextbox you need to do following
if (e.KeyChar == 9)
{
e.Handled = false;
}