Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resetting values to default
Message
From
17/02/2002 10:06:50
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
15/02/2002 18:52:41
Ian Johnston
Computer Software Solutions
Woodland, California, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00621009
Message ID:
00621278
Views:
15
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform