Windows Forms: SelectionChanged event for TextBox class

后端 未结 3 1560
鱼传尺愫
鱼传尺愫 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()

提交回复
热议问题