Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do we know the 'Current Object' ?
Message
De
19/07/1999 18:42:27
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
19/07/1999 15:23:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00243011
Message ID:
00243337
Vues:
37
>Greetings Marcia
>
>>
>>This is all untested and written off the top of my head, so you will need to tweak it. But you get the general idea...
>>
>
>Indeed, and its even simpler than your code because I don't intend to let users edit in grids (or if they do the validation will be part of the grid code)
>
>so all I needed was the syntax for the "_Screen.ActiveForm.ActiveControl"
>
>Does this work if the active control is on a page on a pageframe on a form? If so, then thats exactly what I'm looking for

What's wrong with this? I mean, with This.property? The active object should be a grown up entity, capable of taking care of itself.

There's a couple of gotchas with "_Screen.ActiveForm.ActiveControl" - first, it may be nonexistent at times (like when some object has lost focus, and another object's When is executing - so the other object's .GotFocus is still pending, and may yet not execute at all, if the .When returns .f.). Second, the "_Screen.ActiveForm.ActiveControl" may be a container of any kind - grid, pageframe, container, button group, or other, so you would have to drill down to find which member of the container's controls is the active object.

You were warned :).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform