Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Resetting values to default
Message
De
17/02/2002 10:06:50
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
15/02/2002 18:52:41
Ian Johnston
Computer Software Solutions
Woodland, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00621009
Message ID:
00621278
Vues:
9
>I am looking for a way to reset the default values for check boxes and comboboxes on a page. The combo boxes have character values so if I try to call the setAll method of the page with .SetAll('value',0), it cannot handle the comboboxes.
>
>TIA

Ian,
SetAll() might work if you used your subclassed methods with a value_assign method.
However there is another easier method. If combos, textboxes etc were bound controls (controlsource were not empty) controlsources would control the value, right ? So in such cases what I do is to create a dummy cursor with needed field types. Add a oRec custom property to form and bind controlsources to thisform.oRec.Fieldname. ie:

create cursor dummy (firstname c(10), lookup1 c(10), lookup2 i...)
insert into dummy (....)
scatter to name thisform.oRec

*Combox has controlsource thisform.oRec.Lookup1
* Here I want all of them to reset
select dummy
scatter name thisform.oRec blank

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform