Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ON KEY LABEL
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00155868
Message ID:
00155877
Vues:
28
>Is it possible to set up an ON KEY LABEL to return a string to the current editbox?
>
>I want to do something like
>On Key label Ctrl+Alt+F1 "This is a beautiful day!"
>and as I'm typing along in my editbox have Ctrl+Alt+F1 insert
>"This is a beautiful day!"
>at the current cursor location. But when I try to assign this I get a syntax error.
>
>I also tried
>On Key label Ctrl+Alt+F1 This.Value = This.Value + "This is a beautiful day!"
>and
>On Key label Ctrl+Alt+F1 ? "This is a beautiful day!"
>but these also gives a syntax error.
>
>TIA
>Rick

Firstly, it's better to use Editbox.KeyPress event and add there:
IF nKeyCode=... && i know that there is ALT propble here, so you may choose another key
This.Value=This.Value+"..."
ENDIF
If you want to stick to ON KEY LABEL, then you should:
1. Create Form's custom method (or system procedure).
***Form.AddToEditBox
This.edit1.value=This.edit1.value+"This is ...."
2. Use absolute reference to the form in ON KEY LABEL command:
ON KEY LABEL .... oApp.MyForm.AddToEditBox
3. Restore ON KEY in Form Destroy event.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform