in reply to Disappearing Tk buttons

Hi,
this was not your question, but instead of inserting spaces you can get centered lines by tagging them like so:
use Tk; use strict; use warnings; my $mw = tkinit; my $text = ''; $text .= 'x' x rand(40) ."\n" for (1..20); my $t = $mw->Text()->pack; $t->tagConfigure(centered => -justify => 'center'); $t->insert('end',$text,'centered'); MainLoop();
Cheers Christoph

Replies are listed 'Best First'.
Re^2: Disappearing Tk buttons
by NateTut (Deacon) on Jun 09, 2009 at 01:57 UTC
    Thanks I was never happy with the way I was doing that.