Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling setfocus from text box giving error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00629840
Message ID:
00629880
Vues:
10
Sergey;

As I recall you can also use a negative number to go the other way in the Tab Order.

Tom



>Do you call Lostfocus from some other method or it's triggered by leaving the object?
>BTW, there's another way to move focus. You can return a number from the Valid and it'll tell VFP to what object after the current object in the tab order move focus to. For example, returning 2 would move focus to the second object after current.
>
>>Lostfocus as per you.
>>
>>>In what method did you put this code?
>>>
>>>>Thanks Sergy,
>>>>
>>>>Just I checked this code giving same error.
>>>>
>>>>thisform.label1.caption=""
>>>>If mamtp="C"
>>>>thisform.combo3.setfocus()
>>>>nodefault
>>>>endi
>>>>
>>>>
>>>>>You cannot call SetFocus() from Valid() but you can from LostFocus(). Don't forget to add NODEFAULT to prevent default VFP behavior.
If abc = tru
>>>>>   thisform.xyz.setfocus()
>>>>>   NODEFAULT
>>>>>endif
>>>>>
>>>>>>Hi,
>>>>>>On text lostfocus/valid event i am using certain validation If validation tru I want to skip 2 text box for this I am using
>>>>>>example
>>>>>>
>>>>>>If abc = tru
>>>>>>
>>>>>>thisform.xyz.setfocus()
>>>>>>
>>>>>>endif
>>>>>>
>>>>>>but this not going on desire control and giving error cannot call setfocus fromwhen,valid,range high,rangelow.....
>>>>>>
>>>>>>Any solution to solve problem...please.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform