Get current scroll position from rich text box control?

后端 未结 3 1069
不知归路
不知归路 2020-11-30 12:31

I have searched the internet far and wide and seen many questions like this, but I have not seen an actual answer.

I have a rich text box control with lots of text i

3条回答
  •  半阙折子戏
    2020-11-30 13:23

    The following works very well in one of my solutions:

    Point P = new Point(rtbDocument.Width, rtbDocument.Height);
    int CharIndex = rtbDocument.GetCharIndexFromPosition(P);
    
    if (rtbDocument.TextLength - 1 == CharIndex)
    {
       btnAccept.Enabled = true;
    }
    

提交回复
热议问题