Re: Composite Widget Problem

Rob Seegel <[email protected]>
Newsgroups gmane.comp.lang.perl.tk
Message-ID <[email protected]>
Ala Qumsieh wrote:

>Perhaps I'm missing something obvious here, but I'm
>really stumped. Why doesn't the Canvas have a black
>background in this script.
>
>  
>

The following would also work:

  sub Populate {
     my ($w, $args) = @_;
     $w->SUPER::Populate($args);

     my $c = $w->Component(
        Canvas => 'Canvas',
        -bg => 'black'
     )->pack;

     $w->ConfigSpecs( -background => [qw/SELF/] );
  }

This:

  sub Populate {
     my ($w, $args) = @_;
     $w->SUPER::Populate($args);

     my $c = $w->Component(
        Canvas => 'Canvas',
        -bg => 'black'
     )->pack;

     $w->ConfigSpecs(
        -background => [qw/CHILDREN/, undef, undef, 'black']
     );
  }

This:

  sub Populate {
     my ($w, $args) = @_;
     $w->SUPER::Populate($args);
     my $c = $w->Component(Canvas => 'Canvas')->pack;
     $w->ConfigSpecs(
        -background => [qw/CHILDREN/, undef, undef, 'black']
     );
  }

Or this:

  sub Populate {
     my ($w, $args) = @_;
     $w->SUPER::Populate($args);
     my $c = $w->Component(Canvas => 'Canvas')->pack;
     $w->ConfigSpecs(
        -background => [qw/SELF/],
        -canvasbg   => [{-background => $c}, undef, undef, 'black']
     );
  }

Hope that provides a few options ;-)

Rob


-++**==--++**==--++**==--++**==--++**==--++**==--++**==
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.