Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Text box
Message
De
04/03/2002 10:01:29
 
 
À
04/03/2002 09:25:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00627767
Message ID:
00627795
Vues:
10
>Hi,
>
>1. on normal text button. key press event
>If nkeycode=13
>thisform.combo3.setfocus
>endif
>not accepting
>
>What is actual difference between .setfocus and .setfocus()
>
>Please help.
Hi Sajjad;

Each thing in the right place.. Here some instance on how to do it:

ps: first of all we have to create a property to control it
Procedure keypress
If nkeycode=13
   thisform.nmystatus = 13
endif
thisform.nmystatus = 0
* if you want to force the control to VALID method just use: KEYBOARD CHR(13)
endproc

procedure valid
if  thisform.nmystatus = 13
endif
if  thisform.nmystatus = 0
    return .f.
endif
endproc

procedure errormessage
if  thisform.nmystatus = 0
    return "oh oh, your status is 0"
endif
if  thisform.nmystatus = 4
    return "oh oh, your status is N"
endif
endproc

procedure lostfocus
if  thisform.nmystatus = 13
    thisform.combo3.setfocus
endif
endproc
ps: Notice that the execution of the each tasks should be made in it respective method..



Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform