Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checkbox click - how to prevent changing the value?
Message
 
 
To
09/07/2010 11:16:53
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:
01471953
Message ID:
01472002
Views:
47
>>>>Hi everybody,
>>>>
>>>>I added NODEFAULT and return in Checkbox Click event, but it still changes the value.
>>>>
>>>>How can I prevent it?
>>>>
>>>>Thanks in advance.
>>>
>>>Set it to ReadOnly or Enabled = false
>>
>>No one with good suggestions of resolving the problem? It's probably a bug - but I'm not sure what workaround options are?
>
>
>I would be surprised if it were a bug - you're probably returning the wrong value from the When event

I return either .t. or .f.

Here is the code (and I just moved it to MouseDown with the same effect).
LPARAMETERS nButton, nShift, nXCoord, nYCoord
this.AddProperty('lOkToProceed',.t.) 
IF thisform.lMadeChanges and thisform.AskToSave() = 2
   this.lOkToProceed = .f.
   NODEFAULT
ENDIF    
Had it in when (returning true/false with no nodefault) - same effect.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform