Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checkbox, Tri State, .T., .F. and .NULL.
Message
From
18/11/2006 10:01:19
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01170962
Message ID:
01170971
Views:
12
This message has been marked as a message which has helped to the initial question of the thread.
>Hi all
>
>I have a form property lLastDOW = .NULL. the checkbox comes up with a Gray tick mark as expected. Now I click in the checkbox and THIS.VALUE = "0", another click THIS.VALUE = "1". I have tried to set VALUE to .F. in the properties sheet, but I still get character "1" or "0", not even numeric 1 or 0
>
>How can I get the checkbox to be NULL at startup, when first clicked go from Gray to Ticked and THIS.VALUE = .T., second click become Un-Ticked and THIS.VALUE = .F., then subsequent click toggles .T. and .F.
>
>Please advise.

I struggle hard to get this functionality myself, but I got it to work.
Init:
this.AddProperty('nValue',0)
InteractiveChange:
NoDefault 
Do case 
  Case IsNull(this.nValue)
    this.Value=1
  Case this.nValue=1
    this.Value=0
  Otherwise 
    this.Value=.Null.
EndCase 
this.nValue=this.value
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform