Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Option button with boolean instead of integer values?
Message
From
03/06/2005 09:24:25
 
 
To
03/06/2005 07:46:34
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01019769
Message ID:
01019812
Views:
26
This message has been marked as the solution to the initial question of the thread.
Hello,

you can only bind numeric fields to the optiongroup ..
but you can subclass the optiongroup and build your own that is capable of handling boolean values

e.g.
Optgroup:Init
THIS.AddProperty('cControlSource',THIS.ControlSource)
THIS.ControlSource = ''

Optgroup:Refresh
THIS.Value = IIF(EVALUATE(THIS.cControlSource),1,2)

Optgroup:InteractiveChange
REPLACE (JUSTEXT(THIS.cControlSource)) WITH (THIS.Value=1) IN (JUSTFNAME(THIS.cControlSource))

Optgroup:ProgrammaticChange
REPLACE (JUSTEXT(THIS.cControlSource)) WITH (THIS.Value=1) IN (JUSTFNAME(THIS.cControlSource))
you may need to make some small adjustments .. but this should get you started ..

Regards
Christian
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform