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
this TextBox, adds "jj" when the user presses k key. The cursor position is corrcted.
public class MyTextBox : TextBox
{
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.K)
{
int pos = this.SelectionStart;
this.Text = this.Text.Substring(0, this.SelectionStart) + "jj"
+ this.Text.Substring(this.SelectionStart);
this.SelectionStart = pos + 2;
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
}