Freigeben über


Valid Event

Occurs before a control loses the focus.

PROCEDURE Control.Valid
[LPARAMETERS nIndex]

Parameters

  • nIndex
    Uniquely identifies a control if it is in a control array.

Remarks

If the Valid event returns true (.T.), the control can lose focus - focus might not pass to another control. If the Valid event returns false (.F.), the control does not lose focus.

The Valid event can also return a numeric value. Returning a numeric value has one of three effects:

  • If 0 is returned, the control does not lose focus.
  • If a positive value is returned, the value specifies the number of controls the focus advances. For example, if the Valid event returns 1, the next control gets the focus.
  • If a negative value is returned, the value specifies the number of controls the focus moves back. For example, if the Valid event returns –1, the previous control gets the focus.

See Also

LostFocus Event | When Event

Applies To: CheckBox | ComboBox | CommandButton | CommandGroup | EditBox | Grid | ListBox | OptionButton | OptionGroup | Spinner | TextBox