Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the last method when leaving a container?
Message
 
 
À
25/07/2008 04:18:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01333892
Message ID:
01334155
Vues:
13
Hi Koen,

I see that LostFocust() doesn't fire in this case. It's definitely a bug. The GotFocus() seems to be working fine.
Try following workaround. Add a property to a form, say lWcHasFocus
* Container  GotFocus
Thisform.lWcHasFocus = .T.

* Container.LostFocus
Thisform.lWcHasFocus = .F.
* Call Validation method here
..
* Form QueryUnload
IF Thisform.lWcHasFocus
  *  Call Validation method here
  ...
ENDIF
>
>I have a myContainer containing an IE object and a couple of buttons to facilitate the editing of IE.Document. I would like to have a "are you sure to leave form without saving changes" message box when user clicks the form QueryUnload X box.
>The myContainer.LostFocus does not get fired when applying the QU-Box.
>Noticed in the coverage profiler that last methods which are activated: myForm.QueryUnload - myForm.Destroy - myContainerDestroy.
>and no LostFocus
>
>Regards,
>
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform