Encrypted

SetFocus

This method is Visual FoxPro's answer to _CUROBJ. It allows you to set the focus to any control.

Usage

oObject.SetFocus()
SetFocus works kind of inside out from the way _CUROBJ does its stuff. With _CUROBJ, you assign a value that leads to the object you want. In the new, OOP paradigm, you call the SetFocus method for the object you want to receive focus.

SetFocus can't be called from some methods. The ones you're likely to run into are When and Valid. Make your calls from GotFocus and LostFocus instead.

Example

* In a form to edit Employee records, * the Click method for the "Edit" button might: ThisForm.First_Name.SetFocus()

See Also

GotFocus, LostFocus, _CurObj


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net