#! /usr/local/bin/perl -w use strict; use Tk; use Tk::BrowseEntry; # Create the main window my $w; $w->{main} = MainWindow->new; # Create the browse entry $w->{be} = $w->{main}->BrowseEntry( -label => "be" )->pack; $w->{be}->insert("end", "opt1"); $w->{be}->insert("end", "opt2"); $w->{be}->insert("end", "opt3"); # Make a font my $font = $w->{main}->fontCreate('myfont', -family => 'Helvetica', -size => 20); # Assign it to the widget $w->{be}->configure(-font=> 'myfont'); # Find all the children of the browse entry. foreach ($w->{be}->children) { #print "$_\n"; # find all the grandchildren and assign them a new font. foreach ($_->children) { #print "\t$_\n"; if ($_->cget('-font')) { $_->configure(-font => 'myfont'); } } } MainLoop;