Focus Lost event for a Winforms TextBox?

前端 未结 3 443
长发绾君心
长发绾君心 2020-12-10 17:53

Which event should I use for this?

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

    Control.Leave or Control.LostFocus:

    When you change the focus by using the keyboard (, +, and so on), by calling the Select or SelectNextControl methods, or by setting the ContainerControl.ActiveControl property to the current form, focus events occur in the following order:

    1. Enter
    2. GotFocus
    3. Leave
    4. Validating
    5. Validated
    6. LostFocus

    When you change the focus by using the mouse or by calling the Focus method, focus events occur in the following order:

    1. Enter
    2. GotFocus
    3. LostFocus
    4. Leave
    5. Validating
    6. Validated

    If the CausesValidation property is set to false, the Validating and Validated events are suppressed.

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

    Control.LostFocus.

    0 讨论(0)
  • 2020-12-10 18:20

    'Control.LostFocus'

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