foreach my $key (@keys) { $cells{$row.$i}=$mwwidgets{"sc_list"}->Label(-textvariable=>\ +$info{$key.$row},-relief=>"ridge",-width=>15)->grid(-row=>$row,-colum +n=>$i)->bind('<Double-Button-1>',sub{profile_window($currentrow)}); print $cells{$row.$i}; #$cells{10}->configure(-text=>"bla"); last if ($i==7); $i++; } $row++;
this is just a snippet from a bigger program, but i need some help with why it doesnt work. its supposed to fill the %cells with labels and grid them in the scrolled widget $mwwidgets{"sc_list"} (it's a hash of all widgets). @keys contains the keys for the %info hash, but i dont think it matters here.
the line that right now is a comment is supposed to test if it worked, but the warning tells me it cant call the method on an uninitialized value, same for the print line. the labels are being created though, they also contain the right text and the bind works. what to do?
(btw this is my first post here, no idea if i did the formatting right)
In reply to Tk: Creating label in hash by banzai
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |