Disable selecting text in a TextBox

前端 未结 10 1835
再見小時候
再見小時候 2020-12-06 12:42

I have a textbox with the following (important) properties:

this.license.Multiline = true;
this.license.ReadOnly = true;
this.license.ScrollBars = System.Win         


        
10条回答
  •  佛祖请我去吃肉
    2020-12-06 13:21

    Very Easy Solution

    Find a Label and into the textbox go to mousedown event and set focus to the label

    This is in VB and can be easily converted into C#

    Private Sub RichTextBox1_MouseDown(sender As Object, e As MouseEventArgs) Handles RichTextBox1.MouseDown
            Label1.Focus()
        End Sub
    

提交回复
热议问题