문제

I'm working with a Rich Textbox and want to get the text that the user will be highlighting with the mouse. Is there an event handler in VB.net that does this?

도움이 되었습니까?

해결책

it is RichTextBox.SelectionChanged event.

You can use it like that:

Private Sub r1_SelectionChanged(sender As System.Object, e As System.EventArgs) Handles r1.SelectionChanged
    Me.Text = r1.SelectedText
End Sub
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top