ClearFocus Method

Removes the focus from the control that has the focus, leaving no control with the focus.

Syntax
ClearFocus

# Notes

Calling ClearFocus has the same effect as calling the Window class method, SetFocus. You can set the focus using the SetFocus property of the RectControl class. Please note that the SetFocus method of the RectControl class does nothing when the control it is being applied to is not capable of having the focus on the platform on which the code is running.

# Example

The following code in the Action event of a PushButton removes the focus from the object in the window that has the focus.

ClearFocus

# See Also

RectControl, Window classes.