private void rtbInput_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
{
if(e.KeyCode == Keys.Delete )
LineNumber.DrawLineNumber(picLine.CreateGraphics(), rtbInput, picLine);
//this is my function to draw line number
}
note that function named "rtbInput_PreviewKeyDown" means I attached this handler to previewKeyDown event of the richTextBox.
No comments:
Post a Comment