Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Appendix B.  Options and Default Valuesfor Each Widget

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

					  


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial