radio button problem - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

radio button problem

ali.hammadbaigali.hammadbaig Posts: 5Member
hi
i have developed a form with 2 radio buttons and an "OK" button...
i want that when i click the ok button i could get the state of the radio button which i selected.. in simple i want to know which radio button is selected at the moment..

i used this trigger on button .. (when-button-pressed)..but it says cannot find the itemID

declare
mi_id MenuItem;
begin
//'FIRST_BUTTON'is the name of the first radio button on my form
mi_id := Find_Menu_Item('FIRST_BUTTON');

//check which radio button is selected
if Get_Menu_Item_Property('RADIO_GROUP4.FIRST_BUTTON',CHECKED)= 'TRUE' then
Message('button 1 is selected');
else
Message('button 2 is selected');
end if;
end;

Comments

  • lucky_melucky_me Posts: 39Member
    [b][red]This message was edited by lucky_me at 2005-2-5 23:43:8[/red][/b][hr]
    [b][red]This message was edited by lucky_me at 2005-2-5 23:37:14[/red][/b][hr]
    I was having the same problem and very confused what to do . I tried this something andd wanna share it with you.Let's see whether it help you or not.


    If you just have to check which button has pressed then you can do this......


    suppose you have a radio group "RG" having 2 radio buttons B1 and B2. set B1 initial value ='A' and b2 initial value='B' (say for example).

    Now you can check as
    If :RG='A' then
    message ('Button 1 is selected');
    else
    message ('Button is selected');
    end if;


    : hi
    : i have developed a form with 2 radio buttons and an "OK" button...
    : i want that when i click the ok button i could get the state of the radio button which i selected.. in simple i want to know which radio button is selected at the moment..
    :
    : i used this trigger on button .. (when-button-pressed)..but it says cannot find the itemID
    :
    : declare
    : mi_id MenuItem;
    : begin
    : //'FIRST_BUTTON'is the name of the first radio button on my form
    : mi_id := Find_Menu_Item('FIRST_BUTTON');
    :
    : //check which radio button is selected
    : if Get_Menu_Item_Property('RADIO_GROUP4.FIRST_BUTTON',CHECKED)= 'TRUE' then
    : Message('button 1 is selected');
    : else
    : Message('button 2 is selected');
    : end if;
    : end;
    :
    :





Sign In or Register to comment.