Hi

YES.... I know the code is really bad.....but

How can I create a group of checkbuttons, that will act independand but
call the same sub.
Something like :

$bs[1] =
$opbtFrm->Checkbutton(-text=>"Spasie",-background=>'gray',-padx=>10,
        -offvalue => 0,-onvalue => 1,-variable => {\$cb_value[1]},
        -command=>
sub{\&do_get({$file[1]})})->pack(-side=>'top',-anchor=>'w',-padx=>20);
$bs[2] =
$opbtFrm->Checkbutton(-text=>"Spasie",-background=>'gray',-padx=>10,
        -offvalue => 0,-onvalue => 1,-variable => {\$cb_value[2]},
        -command=>
sub{\&do_get({$file[1]})})->pack(-side=>'top',-anchor=>'w',-padx=>20);

 sub do_get{
        if($cb_value[$i] == 1) {
        my ($file) = @_;
        my $file_val = $main->getOpenFile(-filetypes => $types,
            -defaultextension => '.txt');
        print qq{You chose to open "$file_val"\n} if $file_val;
    } elsif ($cb_value[$i] == 0) {
        print qq{Deselect} }
    }

How can I send cb_value for each button?
How do I open the file for that spesific button and assign the file to
that button?


Thanx

-- 
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