Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.