Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checkbox click - how to prevent changing the value?
Message
De
09/07/2010 12:19:58
 
 
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:
01471953
Message ID:
01472017
Vues:
46
Maybe I don't understand the problem.

You have a checkbox. When the user clicks the checkbox you want to execute a piece of code but you don't want the value of the checkbox to change.

I tried this
*Checkbox.When
this.click()
return .F.

*Checkbox.Click
messagebox("Checkbox Clicked")
alternatively
*Checkbox when
messagebox("Checkbox Clicked")
return .F.

both displayed the messagebox without changing the value of the checkbox.


>>>>>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?
>>
>>Haven't read the entire thread but how about..............
>>
>>Putting the Click code in When and returning FALSE
>
>Try using WHEN - the click is not working then.
>
>In other words - if I try when or MouseDown - click is ignored.
>
>If I try Click with NODEFAUT - click happens.
>
>------------------------------
>So, looks like the only way is to switch value back which looks silly.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform