FocusOut Event

The FocusOut event is triggered any time the input focus leaves the field. The focus leaves a field when the user clicks another field or tabs out of the field.

Supported By:

 

FocusOut events are supported by check boxes, dropdown boxes, dropdown edit boxes, radio buttons, text boxes, and multi-line text boxes.

 

EventArgs Properties:

 

None

 

 

Example:

 

The following code sets the maximum number of characters allowed in a the text box (TextBox2) to a maximum of 25 characters. Any additional characters are truncated.

 

If TextBox2.Text.Length > 25 Then

TextBox2.Text = TextBox2.Text.Substring (0, 25)

End If