Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When of checkbox fires after Click
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01472057
Message ID:
01472072
Views:
45
>>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform