Windows Forms: SelectionChanged event for TextBox class

后端 未结 3 1544
鱼传尺愫
鱼传尺愫 2020-12-10 15:01

How do I get notified of a selection change in a text box in .NET 2.0? I was unable to find a SelectionChanged event or an OnSelectionChanged method. What is the best workar

相关标签:
3条回答
  • 2020-12-10 15:18

    You can use TextBox also.

    Write a function GetMyPosition() and put in the events

    • TextChanged()
    • MouseClick()
    • KeyUp() (In KeyDown() the position isn't changed)

    When you want to notify the highlighting of a text, you also have to use

    • MouseHover()
    0 讨论(0)
  • 2020-12-10 15:24

    You could use a RichTextBox and set Multiline to false. It has a OnSelectionChanged.

    0 讨论(0)
  • 2020-12-10 15:32

    Well, I guess this may help! You will need to use RichTextBox still.

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