# Hello all # How do I colour the non-white area in the following white (leaving the labframe groove around it :) # 343 metres/meters per second at 20 use Tk; require Tk::LabFrame; use Tk::LabEntry; my $diswindow = MainWindow->new(-title => "Distances...",); $diswindow->minsize(qw(700 80)); $diswindow->maxsize(qw(700 80)); my $colour = 'white'; my $Temp : shared = 20; my $Temp3 : shared = ("\x{00B0}"); $diswindow->configure(-bg => $colour,); # labframe for distances my $f1 = $diswindow->LabFrame(-bg => $colour, -label => "Test distances (in meters) and time taken to travel such at temperature (in \x{00B0}C).", -labelside => "acrosstop")->pack(-padx => 5, -pady => 7); # the \x{00B0} in the above prints the "UTF-8/**** encoded degree symbol" # check this again because it looks wrong ?!? # Abbrev of celsius is just C ??! # don't want left, rightk top or bottom want "acrosstop" # The acrosstop creates a grooved frame around the central frame and puts the label # near the northwest corner such that it appears to ``overwrite'' the groove. # breakup f1 labframe # my $topframe4u=$f1->Frame(-bg => $colour,)->pack(-side=>'top', -fill=>'x'); my $leftframe4u=$f1->Frame(-bg => $colour,)->pack(-side=>'left', -fill=>'y'); my $rightframe4u=$f1->Frame(-bg => $colour,)->pack(-side=>'left', -fill=>'y'); my $rightframe4temp=$f1->Frame(-bg => $colour,)->pack(-side=>'left', -fill=>'y'); my $a_to_b_distance = 343; # # Showing that distance: my $atbdis = $leftframe4u->LabEntry(-bg => $colour, -label => "a to b distance =", -labelPack => [-side => "left"], -width => 10, -textvariable => \$a_to_b_distance)->pack(-side => 'left', -padx => 5, -pady => 5); $atbdis->configure(-bg => $colour,); # The distance of $a to $b is then travelled by sound in say $time_a_to_b # showing the time: my $time_a_to_b = ($a_to_b_distance / 343 ); my $a_b = ("a to b is then travelled by sound in... "); my $wida = $rightframe4u->Label(-bg => $colour, -width => 49, -text => $a_b . $time_a_to_b, )->pack(-side => 'left', -padx => 1, -pady => 5); # $Temp3 = ("\x{00B0}"); $say1 = ("when the tempreature is "); # showing the temp: my $wid = $rightframe4temp->Label(-bg => $colour, -width => 24, -text => $say1 . $Temp . $Temp3, )->pack(-side => 'left', -padx => 1, -pady => 5); MainLoop;