Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checkbox, Tri State, .T., .F. and .NULL.
Message
From
19/11/2006 06:39:46
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01170962
Message ID:
01171046
Views:
11
>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
>

A gray tick ? themes = .F.

are you sure ?
I can't see this behavior, and checkbox.value cannot to become a character.

>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.
>

if
thisform.lLastDOW = .NULL.
and
vartype(thisform.lLastDOW)="L"
then VFP should work in this manner.
x=CREATEOBJECT("form")
ADDPROPERTY(x,"me",x)

ADDPROPERTY(x,"lLastDOW",.NULL.)
x.addobject("ckb","ckb")
x.ckb.Controlsource = "thisform.lLastDOW"
x.ckb.visible = .T.
x.ckb.themes = .F.
CLEAR

x.show



DEFINE CLASS ckb as CheckBox
	VALUE = 1	&& this is discarded
	
	PROCEDURE interactiveChange
		ACTIVATE SCREEN
		? this.Value,VARTYPE(this.Value,.t.)
ENDDEFINE
Attention,
a bug exixts, when value is a logical, CTRL+0 show a Gray tick, but checkbox.value become .T., not null

>Please advise.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform