How to get scroll position for RichTextBox?

前端 未结 1 875
孤街浪徒
孤街浪徒 2021-01-25 04:12

I\'m working in C#, Windows Forms application, and have a problem getting scroll position for RichTextBox with large amount of text.

I\'m using this code:



        
相关标签:
1条回答
  • 2021-01-25 05:05

    I thought it was about time to case this into an answer

    GetPositionFromCharIndex(0)
    

    Retrieves the location within the control at the specified character index

    This will get the offset, of the character relative the the control

    0 讨论(0)
提交回复
热议问题