I was meditating on the fallacy of the human notion of the present moment. There is no moment.....only flow. Inspired by a song I heard last night
#!/usr/bin/perl use warnings; use strict; use Tk; my $mw=tkinit; $mw->geometry('+300+300'); $mw->fontCreate('big', -family=>'arial', -weight=>'bold', -size=>int(-18*18/14)); my $c=$mw->Canvas(-width=>600,-height=>100,-bg=>'white')->pack; #Create haiku my $t1 = $c->create('text',20,20, -anchor=>'w', -font => 'big', -text=>'my socks are new, but'); my $t3; $mw->after(2000,sub{ my $t2 = $c->create('text',20,50, -anchor=>'w', -font => 'big', -text=>'it won\'t last long, because '); my ($bx,$by,$bx1,$by1)= $c->bbox($t2); + #print "$bx1\n"; # $t3 = $c->create('text', 290 ,50, # fixed :-) $t3 = $c->create('text', $bx1 ,50, -anchor=>'w', -font => 'big', -text=>'Time'); }); my $t4; $mw->after(5000,sub{ $t4 = $c->create('text',20,80, -anchor=>'w', -font => 'big', -text=>'keeps moving along'); }); $mw->after(5500,sub{ $mw->repeat(10, sub{ $c->move($t3,1,0); $c->move($t4,1,0); })}); MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk Time Haiku
by Pancho (Pilgrim) on Mar 11, 2008 at 01:47 UTC | |
by jdporter (Paladin) on Mar 20, 2008 at 01:05 UTC | |
|
Re: Tk Time Haiku
by Argel (Prior) on Mar 12, 2008 at 01:10 UTC | |
|
Re: Tk Time Haiku
by pobocks (Chaplain) on Mar 18, 2008 at 22:15 UTC | |
by zentara (Cardinal) on Mar 19, 2008 at 14:25 UTC | |
by pobocks (Chaplain) on Apr 18, 2008 at 06:42 UTC |