Validate problem!

  • Thread starter Thread starter ORC
  • Start date Start date
O

ORC

I have made a user control that Inherites a TextBox but my problem is that
the OnValidate event is missing in CF. I have tried to make a workaround to
this by overrideing the lostfocus event and in that i have turned focus back
to the TextBox if the user has entered a wrong value. But but ... If the
user has entered a wrong value and press close form(dialog) the on focus is
still done but the form also closes leaving the wrong value in the textbox -
how should I cancel the form close in such a case???

Thanks,
Ole
 
yes, umm - but if the cursor is located in the custom control or a textbox
the user will only realize that he can't close the form - not knowing what
is going on. Besides this I will have to place a whole bunch of events on
the form (at least one for every control) to set or clear the Keepopen
member - or did I miss something?

Thanks
Ole
 
Back
Top