Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the best way to do this?
Message
From
13/12/2000 20:02:07
 
 
To
13/12/2000 19:39:52
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00453170
Message ID:
00453187
Views:
22
Another idea, Trey. How about making a class for these type of situations ? Has anybody here done that?

Thanks again,

Alex

>>Hi,
>>
>>In a form there are several codified fields. A typical one is "Sex", which is stored in the table as "M" of "F", but has Male/Female option buttons. Similarly for marital status and others. The common thread is that none of these codifications are stored in related tables but are handled in code.
>>
>>In FoxPro DOS I used screen variables to hold the radio button number or caption and filled them in a routine that ran after the scatter each time the recno changed. Data was codified back in the SaveIt routine before the GATHER.
>>
>>I am new to VFP and wonder which is the most practical way to handle this type of simple situations that do not require a separate table. Should I use a form property to hold the option number? Should I do similar codifying/decodifying in similar routines as before? Should I use the Refresh method?
>>
>>TIA,
>>
>>Alex
>
>In VFP, an option button can be bound to a character field in its ControlSource - which will tie to the caption of the selected button.
>
>If you wanted to do this for the M/F optiongroup, you would need to
>
>set the optiongroup.Value to the empty string or "M" or "F",
>make the button captions just "M" and "F" and add labels for "Male" and "Female" and line them up with the button captions
>I'd go ahead and use "Male" instead of "ale" for the label - it's easier to line up the captions that way. Also, it helps if the optiongroup and buttons and labels have their BackStyle = 0 (Transparent) - at least when lining them up.
>
>HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform