develooper Front page | perl.beginners | Postings from February 2002

perl/tk: checkbutton value in array?

Thread Next
From:
Kurt Werth
Date:
February 6, 2002 11:59
Subject:
perl/tk: checkbutton value in array?
Message ID:
3C618B35.4D1BA73F@baesystems.com

I've gotta be missing something simple here.

How is it possible to store the values of multiple checkbuttons in an array?
The code below acts like I've created a single checkbutton: for example, selecting 
one of ten selects all ten. 


for ($x = 0; $x <= $file_counter-1; $x++) {
 $win_ckbox_array[$x] =
   
$right2->Checkbutton(-background=>'blue',-variable=>\$ckbox_stat[\$x])->pack(pady=>2);
}


Not storing the checkbutton variable in an array works fine. That's great for one
or two checkbuttons, but that won't work in this instance.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About