Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ActiveControl
Message
 
À
06/06/2005 20:12:30
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
01020689
Message ID:
01020710
Vues:
83
Hi James

While, I can do that there are instances where I also need to know up front before the control loses focus. I need a way to generically set a current control indicator and a previous control indicator.

I have discovered that if I put DODEFAULT() in the GotFocus event of the affected controls and use BINDEVENTS(myControl,'GotFocus',thisform,'CheckControl',1) the forms "ActiveControl" is a valid object.

I suspect/feel that this is an error in VFP or that the BindEvent needs another flag so that one could bind to the post event point.

Regards
Geoff Scott

>Geoff,
>
>The way I do it is to put code in the lostfocus event of my controls that stores the object in a form property call oLastfocus. Then I can evaluate oLastfocus when I need to.
>
>
>procedure lostfocus()  && textbox lostfocus
>thisform.oLastfocus = this
>endproc
>
>
>>Hi
>>
>>I am having problems with the ActiveControl property. I need to know which control had focus prior to a command button being clicked. I thought I would use BINDEVENTS to bind the GotFocus event of all the controls and then use the form's ActiveControl property to determine what control had focus.
>>
>>Unfortunately, I always end up with Thisform.ActiveControl not evaluating to an object,
>>
>>Why is this and how can I determine which control has focus?
>>
>>Regards
>>Geoff Scott
May all your weeds be wildflowers
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform