Re: Composite Widget Problem

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

> I think this stems from the basic "policy" that
> composites shouldn't be 
> configuring their colors, and
> leaving it up to users who are using the widget to
> do this with 
> options.  There are calls made internally, from
> Tk::Derived, that 
> overrode your black background. It *did* get set --
> but was instantly 
> overridden by Frame's default background color.

That was my guess too. Thanks.

>  You can also take your subwidget out of the line of
> fire by
> nesting it within a Frame. By default, all
> composites propogate
> background/foreground to their children, but not
> descendants, so
> you can do something like this:
> 
>   sub Populate {
>     my ($w, $args) = @_;
> 
>     $w->SUPER::Populate($args);
>     my $f = $w->Frame->pack;
>     my $c = $f->Canvas(qw/-bg black/)->pack;
>     $w->Advertise(Canvas => $c);
>   }

Ahhh .. that will work for me. Thanks a lot.

I tried to play around with ConfigSpecs hoping to
prevent the Frame from passing its defaults to its
children, but couldn't figure it out.

Thanks anyway.
--Ala



		
Discover Yahoo! 
Use Yahoo! to plan a weekend, have fun online and more. Check it out! 
http://discover.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.