Validating event

  • Thread starter Thread starter JJ
  • Start date Start date
J

JJ

Can you force a control to carrying out its validating code without having
to leave/change focus - i.e. raise its validating event ?
 
JJ said:
Can you force a control to carrying out its validating code without having
to leave/change focus - i.e. raise its validating event ?

When do yo want to validate it if not when you are leaving/entering?
Something has to trigger it. Keypress?

Chris
 
The problem I have is that a user can click on a menu and save the file when
there are unwanted chars in the text box. The text box doesn't seem to lose
focus during this time .
If I could get the 'save' command to force validation before it tries to
save that would help.
 
JJ said:
The problem I have is that a user can click on a menu and save the file when
there are unwanted chars in the text box. The text box doesn't seem to lose
focus during this time .
If I could get the 'save' command to force validation before it tries to
save that would help.

In your save routine whey not just call the function that does your
validation, if the validation fails then yell at them?

Chris
 
Thanks Chris.

I did this in the end.


Chris said:
In your save routine whey not just call the function that does your
validation, if the validation fails then yell at them?

Chris
 
Back
Top