Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text box
Message
From
04/03/2002 10:01:29
 
 
To
04/03/2002 09:25:02
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00627767
Message ID:
00627795
Views:
12
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform