Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using the Escape Key
Message
De
29/06/2013 09:07:21
 
 
À
29/06/2013 08:17:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01577481
Message ID:
01577491
Vues:
66
>I'm sorry. Okay. I am disabling the calling button and bringing up two sub buttons.
>The user can either select one of the buttons to bring up a new form OR press
>the escape key to enable to original button that called them.


I would suggest creating a class that is instantiated at the time of the first button press, which receives as a parameter the button control which called it, then hides the class the first button belongs to, and positions the new class wherever it needs to go relative to the first button, and then shows itself and sets focus on a particular button. When the Escape key is pressed, the newly added class will remove itself, and make the original class that called it visible again.

That way each thing does one set of related things:
(1) First button creates the class, passing itself as a parameter
(2) New class:
(2a) Positions itself relative to the first button's class,
(2b) Hides first button's class,
(2c) Makes itself visible
(2d) Sets focus on itself

When the user presses escape:
(3) New class makes first button class visible
(4) Destroys itself.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform