插入位置在System.Windows.Forms.RichTextBox中更改了EVENT [英] Caret position changed EVENT in System.Windows.Forms.RichTextBox
问题描述
您好,
是否有可能在System.Windows.Forms.RichTextBox中捕获Caret位置已更改EVENT?
is it possible to capture Caret position changed EVENT in System.Windows.Forms.RichTextBox ??
I Forms.RichTextBox中需要row和col
I need row and col in Forms.RichTextBox
Jerry
推荐答案
也许这个:
private void richTextBox3_SelectionChanged(object sender,EventArgs e)
{
int index = richTextBox3.SelectionStart;
int line = richTextBox3.GetLineFromCharIndex(index);
label25.Text = this.richTextBox3.SelectionStart.ToString(); //
private void richTextBox3_SelectionChanged(object sender, EventArgs e)
{
int index = richTextBox3.SelectionStart;
int line = richTextBox3.GetLineFromCharIndex(index);
label25.Text = this.richTextBox3.SelectionStart.ToString(); //
}
}
这篇关于插入位置在System.Windows.Forms.RichTextBox中更改了EVENT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!