Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hotkey Puzzle.
Message
 
À
23/11/1998 16:53:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00160431
Message ID:
00160801
Vues:
30
David,

You're right, but I thought I'd ask before changing my logic.

Thanks.

Marc




>>Hi,
>>
>>Command buttons can have a hotkey defined via the \<. So when the user presses the hot key, the click eventmethod is executed.
>>
>>But I need to know which (other) control had the focus when the command button was clicked, so I found out that you can set a cActiveControl property to the name of the control that has the focus by issuing
>>
>>this.cActiveControl=upper(thisform.activecontrol.name)
>>
>>in the when eventmethod() of the button.
>>
>>In the Click() eventmethod you can then conditionally execute code based on the setting of the cActiveControl property.
>>
>>My problem is that when the user presses the hotkey, the when eventmethod() is not executed, so the click() method does not know "who called".
>>
>>Anybody found a way to encapsulate this functionality in the command button allone, or are we to use the form to manage this?
>>
>>TIA,
>>
>>Marc
>
>Hi Marc,
>Sounds best to use a property of the form. Adding some code to the gotfocus of object base classes should do it.
>I've had other related problems with "when" not firing. It seems it's been shoe-horned in for backward compatibility.

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform