Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing Y/N into a checkbox
Message
 
À
22/10/1999 01:46:06
Alan Law
Apocalypse Enterprises Inc.
Victoria, Colombie Britannique, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00279790
Message ID:
00279849
Vues:
13
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform