Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to prevent container to lose focus
Message
From
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:
00974193
Views:
34
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform