Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to prevent container to lose focus
Message
 
 
À
04/01/2005 15:51:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
00974182
Message ID:
00974207
Vues:
22
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform