O'Reilly logo

Mastering Perl/Tk by Nancy Walsh, Stephen Lidie

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

Appendix B.  Options and Default Valuesfor Each Widget

In Chapter 13 we discussed how to use the configure and cget methods on our widgets. This appendix shows the output from configure on each of the widgets we cover in this book. The program used to generate the data is as follows:

use Tk;
use strict;

my $mw = MainWindow->new;
while (my $w = <DATA>) {
    next if $w =~ /^#/;
    chomp $w;
    print "\n\n====== $w\n";
    my $o = $mw->$w;
    my(@o) = $o->configure;
    foreach my $opt (@o) {
    	@$opt = map {defined($_) ? $_ : 'undef'} @$opt;
	printf "%s\t%s\t%s\t%s\t%s\n", @$opt;
	
	if ($$opt[4] =~ /^System/) {
	 my ($r, $g, $b) = $mw->rgb($$opt[4]);
	 print "$r $g $b\n";
	}
    }
}

__DATA__
Adjuster
Balloon
Bitmap
BrowseEntry
Button
## ... list shortened ...
Toplevel
Tree

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