Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why cant a SetFocus be used in Valid method ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00658596
Message ID:
00668033
Vues:
21
Bill, your solution sounds interesting... I'll give it a try.
Thanks for your help.

Regards,

Gerard


>Hi Gerard,
>I know this is rather late, but I'll put my $.02 in anyway.
>It seems to me you could do something like this to move to a PARTICULAR control.
>
>(untested)
>cmdUpdate.Valid()
>  Return Thisform.cmdReport.TabIndex - This.TabIndex
>EndProc
>
>
>>Grigore, thanks again for your help.
>>
>>>>For example, if the Valid event returns 0, the control won't lose focus. If Valid returs 2, the focus will skip the next control and will choose the second control. If Valid retuns -1, the previous control will be selected.<<
>>
>>This is nearly what I want. Is there any way to set focust to a PARTCULAR control (rather than a relative control) from within the valid ?
>>
>>
>>Regards,
>>
>>Gerard
>>
>>
>>
>>
>>
>>
>>>Hello, Gerard
>>>
>>>Besides what Sergey and Jim said to you (and they're right), there is a way to set focus from the Valid event. If the valid event returns a numeric value, the focus is set to the corresponding control, respecting the Tab order. For example, if the Valid event returns 0, the control won't lose focus. If Valid returs 2, the focus will skip the next control and will choose the second control. If Valid retuns -1, the previous control will be selected.
>>>
>>>Just remember the focus is set after finishing the Valid event. More specifically, the last line of code, which will be RETURN yournumber.
>>>
>>>Hope this helps
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform