O'Reilly logo

Learning Perl/Tk by Nancy Walsh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A.2. Default Values for Each Widget in Table Form

The following tables contain all of the options for each standard widget (in Tk8). The five columns represent the five values returned in the arrays for each option when configure is used. Note that column 5, "Current Value," will probably not mean much to you, but I've included it for completeness because you'll get it back when you run the same code.

The information in the tables was created by using this code snippet (substitute the correct widget in for Widget):

$w = $mw->Widget->pack;
@config = $w->configure();
    print Pretty @config;    

A.2.1. Button

Option name .Xdefault's name Class name Default Value Current Value
-activebackground
activeBackground
Foreground
SystemButtonFace
SystemButtonFace
-activeforeground
activeForeground
Background
SystemButtonText
SystemButtonText
-activeimage
activeImage
ActiveImage
undef
undef
-anchor
anchor
Anchor
center
center
-background
background
Background
SystemButtonFace
SystemButtonFace
-bd
borderWidth
   
-bg
background
   
-bitmap
bitmap
Bitmap
undef
undef
-borderwidth
borderWidth
BorderWidth
2
2
-command
command
Command
undef
undef
-cursor
cursor
Cursor
undef
undef
-default
default
Default
disabled
disabled
-disabledforeground
disabledForeground
DisabledForeground
SystemDisabledText
SystemDisabledText
-fg
foreground
   
-font
font
Font
{MS Sans Serif} 8
bless({MS Sans Serif} 8 Tk::font)
-foreground
foreground
Foreground ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required