> -----Original Message-----
> From: Hudson T Clark [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, November 30, 2002 6:37 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: $text->insert(?);
> 
> 
> why doesn't this work... I'm so frusted ERR... lol
> 
> #!/usr/bin/perl -w 
> use Tk;
> use strict;
> 
> my $mainwindow = MainWindow->new();
> $mainwindow->minsize( qw(330 240));
> $mainwindow->maxsize(qw(330 240));
> my $textbox = $mainwindow->Text(-height => 5, -width => 30, -state =>
> 'disabled')->pack();
> 
> $textbox->insert('1.0', 'Hi There');
> 
> 
> MainLoop();
> 

Beacuse at the time you attempt to insert text the widget is disabled.  Try
disabling it after inserting the text eg.

<snip>
use Tk;
use strict;

my $mainwindow = MainWindow->new();

$mainwindow->minsize(qw(330 240));
$mainwindow->maxsize(qw(330 240));

my $textbox = $mainwindow->Text(-height => 5, -width => 30)->pack();

$textbox->insert('1.0', 'Hi There');

$textbox->configure(-state => 'disabled');

MainLoop();
</snip>

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to