Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Tk widget derivation problems

by converter (Priest)
on Aug 03, 2003 at 07:54 UTC ( #280409=note: print w/ replies, xml ) Need Help??


in reply to Tk widget derivation problems

I recall reading somewhere that the -background and -foreground options are special-cased in a few places in the Tk code and that this can cause unpredictable behavior in some cases (or something to that effect). Adding entries for the options to the call to ConfigSpecs should solve the problem:

$self->ConfigSpecs( -background => [qw/SELF Background background/], -foreground => [qw/SELF Foreground foreground/], 'DEFAULT' => [ 'SELF' ], );

converter


Comment on Re: Tk widget derivation problems
Download Code
Re: Re: Tk widget derivation problems
by anjiro (Beadle) on Aug 03, 2003 at 09:37 UTC
    That does it, all right. I actually just got a similar reply on the ptk mailing list; the person said that -foreground and -background are a little funny because they're aliased to -fg and -bg.

    Thanks a lot!

    Daniel Ashbrook

      Interesting, in Derived.pm and Widget.pm you see a similar constructs only opposite
      $specs->{'-foreground'} = \@fg,'foreground','Foreground',BLACK];

      Widget.pm
      $cw->ConfigSpecs('-scrollbars' => ['METHOD','scrollbars','Scrollbars' +,'se'], '-background' => [$w,'background','Background'], '-foreground' => [$w,'foreground','Foreground'],
      I think it would be interesting to know what this is doing...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://280409]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2014-08-02 02:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (54 votes), past polls