Hello all..
  the radiobuttons execute the code in the command whether I select OK or
Cancel.. How can I execute on ok only?

I have the following code:
sub OnPowerSearchDialog {
  # Construct the DialogBox
  my $setpwrsrch = $mw->DialogBox( -title=>"Set Node
Dialog", -buttons=>["OK", "Cancel"] );
  $setpwrsrch->add('Label', -anchor => 'w', -justify => 'left', -text =>
qq(Choose Node to search on.\n\tCurrent Node = $pwrsrch ))->pack;
  $setpwrsrch->Label(-text => 'Search on Node')->pack;
 my $rb3_value = $pwrsrch ;
     $setpwrsrch->Radiobutton(-text => 'NO',  -value => "NO" , -variable =>
\$rb3_value, -command => sub {OnPowerSearch("NO"); })->pack;
     $setpwrsrch->Radiobutton(-text => 'YES', -value => "YES", -variable =>
\$rb3_value, -command => sub {OnPowerSearch("YES"); } )->pack;
     $setpwrsrch->Show();
}

sub OnPowerSearch {
    #  set the power search variable
    $pwrsrch =   $_[0] ;
}





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to