Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to prevent container to lose focus
Message
 
 
To
04/01/2005 15:51:14
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00974182
Message ID:
00974207
Views:
24
Hi Alan,

Unfortunately the container class does not have valid method.

Anyway, I already solved problems with this control and now I was trying to work with my colleagues on a simple form. However, the form looks simple, but it requires lots of tables in order to get the information we need. I hope we would be able to finish with that form tomorrow.

>Hi Nadia,
>
>Would it be possible to move the code from the LostFocus to the Valid method and change NODEFAULT to RETURN .F. ? This way the data is validated before losing focus.
>
>
>LOCAL ltDate as datetime
>ltDate = CTOT(DTOC(DATE(1900,1,1) - 2 + THIS.DatePicker.DATE) + " 07:00:00 AM")
>
>IF this.ValidateDate(m.ltDate)
>   this.SetDates (m.ltDate)
>ELSE
>   RETURN .F. && prevent leaving focus from this control
>ENDIF
>
>
>HTH
>
>Alan
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform