Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
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