My requirement is i am trying to develop a text editor for my mother tongue language. That is i am trying to develop tamil text editor using unicode characters. When i am pres
You need to update the SelectionStart Property and increase its length with the size of the new text inserted. Something like:
int curPos = txtEditor.SelectionStart;
if (e.KeyChar == 'k')
{
txtEditor.Text=txtEditor.Text.Insert(txtEditor.SelectionStart, "jj");
txtEditor.SelectionLength = 0;
}
txtEditor.SelectionStart = curPos + 2; //or whatever the length of text u inserted