插入位置在System.Windows.Forms.RichTextBox中更改了EVENT [英] Caret position changed EVENT in System.Windows.Forms.RichTextBox

查看:71
本文介绍了插入位置在System.Windows.Forms.RichTextBox中更改了EVENT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

是否有可能在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆