Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When of checkbox fires after Click
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01472057
Message ID:
01472072
Vues:
46
>>>Hi everybody,
>>>
>>>I made a test form and put a textbox and checkbox on it with this code in When event
>>>
>>>
>>>IF MESSAGEBOX('ok to click?',4,'test')=7
>>>  RETURN .f.
>>> endif
>>>
>>>and with messagebox ('Click') in click event.
>>>
>>>Now, the click will never happen even if I answer Yes on the question.
>>
>>
>>That is because you didn't have CLICK :-)
>>You have only MouseDown event and the MessageBox receives the MouseUp event. So no Click happened.
>>That is why I really try to avoid MessageBxo in WHEN or VALID events.
>
>But how should I solve my problem? I want to be able to Ask user if he wants to Save (Yes/No,Cancel). If he cancel, I want to keep editing.
>
>Are you saying there is no solution here?
*** GotFocus Event
this.Tag = IIF(this.Value,"1","0")

*** Lost Focus
IF NOT this.Tag == IIF(this.Value,"1","0") ;
   AND MESSAGEBOX('ok to click?',4,'test') = 7
       this.Value = (this.Tag == "1")
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform