Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why cant a SetFocus be used in Valid method ?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00658596
Message ID:
00658598
Views:
20
In VFP the logical place to put your code is commandbutton's Click() event not Valid().

>Hi all.
>
>In a lot of my apps, the need arises to have a SetFocus in the Valid method but VFP does not allow this. There does not seem to me to be any good reason for this.
>
>Consider the folowing screen, with say 4 Cmd buttons:
>cmdUpdate
>cmdEnq1
>cmdEnq2
>cmdReport
>
>In the cmdUpdate, there is a bunch of code that Updates a whole pile of files and if this runs ok, I want to set focus on the cmdreport button.
>
>Now if I tab past these buttons,I dont want to set focus to the cmdReport so I cannot put the SetFocus code in the lostFocus of the cmdUpdate.
>(I know I can disable the cmdReport button but lets ignore this for the purpose of the discussion)
>
>
>Why cant I use the setfocus in the Valid event where would seem to be the most logical place.
>
>Can this be done in VFP7 ?
>
>
>Regards,
>
>Gerard
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform