Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Option Button Group
Message
From
20/05/1998 13:54:41
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
20/05/1998 13:41:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00100612
Message ID:
00100615
Views:
63
>I've come across a problem with option button group that I'm a little surprised that I couldn't find in frequently asked questions. I want to use the option button group for a loan applicants residence field (own, rent, etc.). The documentation indicates that with a text type controlsource the caption will be the value stored for the selected button. What if your residence field is only 1 char (O = Own, R = Rent, etc.)? I don't want "O", "R", etc. for my button text. Is there a procedure for accomplishing this? Or, maybe someone could give me a hint as to where I should look for this information. Thanks in advance for the help everyone!
To make it with an optiongroup and keep the result still as "O", "R" etc you could then do it in interactivechange and form.refresh events :
*optiongroup.interactivechange
do case
   case this.value = 1
      replace opgrp with "O"
   case this.value = 2
      replace opgrp with "R"
   case this.value = 3
..
endcase
* Form.refresh
do case
   case opgrp = "O"
      thisform.optiongroup1.value = 1
   case opgrp = "R"
      thisform.optiongroup1.value = 2
..
endcase
Better and no extra code way is to set the field to a numeric value.
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