my $ref2 = $tree->Checkbutton( -text => $_, -variable => \$var, -anchor => 'w' ); $tree->add( $parent.'.'.$column, -window => $ref2 );