From: Daniel M. <dan...@ya...> - 2005-02-15 16:07:01
|
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. Here my code: #!/opt/nokianms/bin/perl # ################################################################# # Complex Upgrade Script # Purpose: Generate XML Files for zcomplex Upgrades # Daniel Mazzini - Nokia USA # AWS/CINGULAR Project # Last Update: Feb 15, 2005 # Version 1.0 # ################################################################# # ################################################################# # Modules and declaration # ################################################################# use Win32::GUI; $w_main_cu= new Win32::GUI::DialogBox( -name => "w_main_cu", -text => "MY MAIN WINDOW", -size => [300,200], -helpbutton => 0, -menu => 0, -maximizebox => 0, -minimizebox => 1, -resizable => 0, ); $w_main_cu->Show(); $w_main_cu->AddButton( -text => "OPTIONS", -name => "gb_options", -left => 33, -top => 22, -width => 198, -height => 67, -style => WS_CHILD | WS_VISIBLE | 7, # GroupBox ); $w_main_cu->AddRadioButton( -text => "OPT 1", -name => "Rb_option1", -left => 59, -top => 50, -width => 60, -height => 12, ); $w_main_cu->AddRadioButton( -text => "OPT 2", -name => "Rb_option2", -left => 150, -top => 52, -width => 60, -height => 12, ); $w_main_cu->AddButton( -text => "Execute", -name => "cb_cu", -left => 150, -top => 130, -width => 100, -height => 25, -foreground => 16744448, -addstyle => BS_DEFPUSHBUTTON ); Win32::GUI::Dialog(); sub cb_cu_Click{ #I want to get here what option was selected. (Selected RadioButton) } sub w_main_cu_Terminate { $w_main_cu->Disable(); $w_main_cu->Hide(); return -1; } Daniel Mazzini Desk +1 972-374-0081 / Mobile +1 2142088109 Email : dan...@ho.../dan...@ya... |