General information
Category:
Coding, syntax & commands
>What's the best way to prevent particular controls losing focus? In FoxPro 2.6, I'd use the VALID snippet & return false if a condition wasn't met, or set the _CUROBJ back to the current objects number.
>
>Is there a different method for the different object types, ie text boxes, combo boxes, etc?
>
>Thanks,
>
> Andy Crawshaw
Do you mean in VFP?
There you can Return .F.
in the valid too.
You can also issue NoDefault
in the LostFocus Event.
It is the same for all objects.
But look out for the Grid.
There the object in the grid loses the focus after in the grid valid event fires.
So you can have that in the control in your grid you don't allow the user to move out the grid, and in the grid you have already allowed it.
You can workaround this by calling the control's valid event in the grid's valid event.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only