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 ...

Get Learning Perl/Tk now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.