Hi Jeremy I have tried your code, it didn't work. I have seen that these are methods for "checkbutton", no "radiobutton". However your answer pointed me to the solution. I found the right method for "radio buttons" and it did work. Thank you very much guys for your help and cooperation. Talk to you guys soon. Cheers SOLUTION: Set RadioButton (checked or not):
$w_main_cu->Rb_option2->Checked(1); #1 to set 0 to clear Get RadioButton State: $rb2_selected =$w_main_cu->Rb_option2->Checked(); return 1 if it is checked, 0= not checked. Jeremy White <[EMAIL PROTECTED]> wrote: Hi, Use the GetCheck and the SetCheck methods. For example, after you have created the radio button use: $w_main_cu->Rb_option2->SetCheck(1); #1 to set 0 to clear in the click event use: sub cb_cu_Click{ #I want to get here what option was selected. (Selected RadioButton) print $w_main_cu->Rb_option1->GetCheck(); print $w_main_cu->Rb_option2->GetCheck(); } >From: Daniel Mazzini >To: perl-win32-gui-users@lists.sourceforge.net >Subject: [perl-win32-gui-users] Radio Buttons Question - Win32::Gui >Date: Tue, 15 Feb 2005 08:02:49 -0800 (PST) > >Hi all > >I have two questions: > >1. I am trying "to check" a radio button as initial state, I mean when I >open a window. I used the option -checked=>1, but nothing happens. > >2. I want to get the the radio_button selected. > >I have been programming with perl for the last two years, I used Tk in the >past, but I want to learn about WIN32::Gui. > >Thanks. Daniel Mazzini Desk +1 972-374-0081 / Mobile +1 2142088109 Email : [EMAIL PROTECTED]/[EMAIL PROTECTED]