Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing Y/N into a checkbox
Message
 
To
22/10/1999 01:46:06
Alan Law
Apocalypse Enterprises Inc.
Victoria, British Columbia, Canada
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00279790
Message ID:
00279849
Views:
12
create a class which will inherit from checkbox

add a property: chrcontrolsource && will hold the AliasName.FieldName
&& leave controlsource blank

add the following to the different procedures
PROCEDURE Refresh
dodefault()

thiscontrolsource=this.chrControlSource
if &thiscontrolsource="Y"
this.value=1
else
this.value=0
endif
ENDPROC


PROCEDURE InteractiveChange
oldalias=alias()
local thiscontrolsource
thiscontrolsource=this.chrControlSource
if this.value=1
select (this.cchildtable)
replace &thiscontrolsource with "Y"
else
select (this.cchildtable)
replace &thiscontrolsource with "N"
endif
select (oldalias)
dodefault()
ENDPROC
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform