Composite Widget Problem

Ala Qumsieh <[email protected]>
Newsgroups gmane.comp.lang.perl.tk
Message-ID <[email protected]>
Perhaps I'm missing something obvious here, but I'm
really stumped. Why doesn't the Canvas have a black
background in this script.

#========= begin
#!perl -w

use strict;
use Tk;

{
  package QQ;

  use base qw/Tk::Frame/;

  Construct Tk::Widget 'QQ';

  sub Populate {
    my ($w, $args) = @_;

    $w->SUPER::Populate($args);

    my $c = $w->Canvas(qw/-bg black/)->pack;
    $w->Advertise(Canvas => $c);
  }

}


my $mw = new MainWindow;
my $p  = $mw->QQ->pack;

my $c = $p->Subwidget('Canvas');
print "C is $c.\n";
$c->createLine(0, 0, 500, 500, -fill => 'red');

MainLoop;
__END__
#============== end

It's just a composite mega widget with a just a
(supposedly black) canvas.

Thanks,
--Ala


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.