How do you prime a radio button ?? 
Author Message
 How do you prime a radio button ??

When I enter a screen I want a couple of radio buttons to be selected as a
default -setup by the user. My code after opening files in this screen is:

IF PER:CONV = 'B'               ! If the default selected is 'B'
  (?OPTION1:RADIO1){Event:Accepted} = True
ELSE
 (?OPTION1:RADIO2){Event:Accepted} = True
.

When the user selects radio1 or 2, the field is primed with 'B' or 'N'
which works. I have tried numerous combinations of code with no luck,

Please help,

Regards,

Kevin Plummer



Fri, 25 Jun 1999 03:00:00 GMT  
 How do you prime a radio button ??

Quote:
> When I enter a screen I want a couple of radio buttons to be selected as a
> default -setup by the user. My code after opening files in this screen is:

> IF PER:CONV = 'B'               ! If the default selected is 'B'
>   (?OPTION1:RADIO1){Event:Accepted} = True
> ELSE
>  (?OPTION1:RADIO2){Event:Accepted} = True
> .

Shouldn't you prime the field that causes the Radio Button setting to
happen?  Rather than trying to set the state of the button, you need to
change the field which causes the setting to occur.  I do it in the
Prime Field on Insert embed.  The assumtion being the state of the radio
button should remain constant for existing records.  Or is this nothing
to do with updating records in a file?
--




Fri, 25 Jun 1999 03:00:00 GMT  
 How do you prime a radio button ??

Quote:

>When I enter a screen I want a couple of radio buttons to be selected as a
>default -setup by the user. My code after opening files in this screen is:
>IF PER:CONV = 'B'           ! If the default selected is 'B'
>  (?OPTION1:RADIO1){Event:Accepted} = True
>ELSE
> (?OPTION1:RADIO2){Event:Accepted} = True
>.
>When the user selects radio1 or 2, the field is primed with 'B' or 'N'
>which works. I have tried numerous combinations of code with no luck,

Definitely won't work with {Event:Accepted}.

Just prime the field that the radio buttons are to work on.  That is
the field with the Options box that surrounds the buttons, and not the
individual buttons themselves.

Regards
--
Steve Greenwood
HiCaliber Software



Sun, 27 Jun 1999 03:00:00 GMT  
 How do you prime a radio button ??

HI Kevin,

To Prime a Radio Button do the following:

Given that you have a file named ORDERS and a Field named COLOR and COLOR
is set to 3 choices (under Validity Checks)
and those choices are RED|WHITE|BLUE

In your form you should have three options buttons :

ORD:Color:Radio1 (RED)
ORD:Color:Radio2 (WHITE)
ORD:Color:Radio3 (BLUE)

In the form EMBED - Window Event Handling; Open Window

add the following code:

! Prime Color OPTION
IF LocalRequest = InsertRecord
        ORD:Color = 'RED'
END

When you run the program the Red Option button will be selected.

If you don't set the LocalRequest to InsertRecord the same option will be
set when the user Modifies(Changes) a record.  This restricts the user from
seeing the choice that was originally saved because every time the window
is opened the Color is set to RED.

HTH

Julian Small aka Zorgat




Quote:
> When I enter a screen I want a couple of radio buttons to be selected as
a
> default -setup by the user. My code after opening files in this screen
is:

> IF PER:CONV = 'B'          ! If the default selected is 'B'
>   (?OPTION1:RADIO1){Event:Accepted} = True
> ELSE
>  (?OPTION1:RADIO2){Event:Accepted} = True
> .

> When the user selects radio1 or 2, the field is primed with 'B' or 'N'
> which works. I have tried numerous combinations of code with no luck,

> Please help,

> Regards,

> Kevin Plummer



Mon, 28 Jun 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. How do you prime Radio Buttons

2. Radio Buttons & Change Button

3. This Radio Button Isn't Like Those Radio Button in other Language!

4. Radio Buttons

5. radio button's

6. Radio button state...

7. Silly radio button problem

8. More about radio buttons and labels in VW

9. Radio Buttons

10. radio canvas/image buttons?

11. radio buttons

12. Filtering browse w/radio buttons

 

 
Powered by phpBB® Forum Software