Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the next filed?
Message
From
22/10/1997 23:58:38
 
 
To
22/10/1997 09:37:48
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00056004
Message ID:
00056254
Views:
29
>Hi everybody!
>
>Is there a way, to determine in a textbox valid routin, that which the next object is? I don't mean the "next" as in order, but the one, whose activation caused the valid routin to fire.
>
>The reason is, that sometimes I don't want to run the valid routin to go. E.g. when user push Exit button, Or Cancel button, when there is unnecesarry to validate the contents of the textbox. But How can I determine, which object on screen caused the valid routin to go?
>I thought, that the validation should make in the when event of all other objects, but it is unconvient.
>Any comment?

if the only reason you need to know what was pressed is for an Exit button then there is no need for anything fancy
setting the Cancel property of a button will make lastkey Escape and you can check that in the valid

if however you nned it for other reason you can also do that by saving the last control and whether there is a pending valid in a property of the container then when a control gets the focus check that property and if it is not a control that should override
the valid return the focus to the control specified in the container
you should either manage it at the application object level or have it cascaded for each container up to the application level
it takes some coding but it works


Arnon
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform