Re: Composite Widget Problem
Ala Qumsieh <[email protected]>
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <[email protected]> |
--- Slaven Rezic <[email protected]> wrote: > Add > > $w->ConfigSpecs(-background => ["SELF"]); > > to the Populate method. Heh. I had tried: $w->ConfigSpecs(-bg => ["SELF"]); but that didn't work because -bg is an alias. I also tried: $w->ConfigSpecs(DEFAULT => ["SELF"]); and that didn't work either because DEFAULT gets triggered only if the option was not found in the Config Specs before. Since the SUPER::Populate calls ConfigSpecs somewhere in the widget hierarchy, the option was already defined. The problem with your approach is that I need it to override *ALL* options. Hard-coding all possible options is ugly. Call me a control-freak, but I don't want the user to be able to change anything. Actually, the real reason is that this is for ZooZ (the GUI builder), and once the user is done building the project, he/she shouldn't need to modify the options (although ZooZ does offer a way to do it). Anyway, Rob's suggestion of having a parent Frame works great. > The code responsible for this behaviour can be found > in Tk/Derived.pm. > The comment there says: > > # Now some hacks that cause colours to propogate > down a composite widget > # tree - really needs more thought, other options > adding such as active > # colours too and maybe fonts It does need more thought indeed ;) Thanks, --Ala __________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail -++**==--++**==--++**==--++**==--++**==--++**==--++**== 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]