in reply to Frame -tile option

There has been some recent discussion of the tile option in comp.lang.perl.tk. Basically, it is not reliable in Perl/Tk based on Tk 8.4 , it dosn't work for me here either. Tile is supposed to be in Tk8.5 and hopefully the next Perl/Tk release ( if there is one :-( ).

In the meantime, you can hack around it

#!/usr/bin/perl ######################################## ### How to fake a background tile ### ### using the place geometry manager ### ######################################## use warnings; use Tk; use strict; my $mw=tkinit; $mw->geometry('500x430'); #my $file = './zen16.gif'; my $file=Tk->findINC('demos/images/earthris.gif'); my $image = $mw->Photo(-file=>$file); my $w = $image->width; my $h = $image->height; for (my $i=0; $i<$mw->screenwidth; $i+=$w) { for (my $j=0; $j<$mw->screenheight; $j+=$h){ $mw->Label(-image=>$image)->place(-x=>$i, -y=>$j); } } $mw->Button(-text=>"Pack your")->pack; $mw->Button(-text=>"widgets")->pack; $mw->Button(-text=>"like normal !")->pack; MainLoop;

I'm not really a human, but I play one on earth Remember How Lucky You Are

Replies are listed 'Best First'.
Re^2: Frame -tile option
by Anonymous Monk on Nov 19, 2008 at 17:16 UTC
    thanks it worked