Kickstart has asked for the wisdom of the Perl Monks concerning the following question:
I have created text with the following on a canvas in Perl/Tk
# Create main area for displaying info my $mainarea = $mw->Canvas; $mainarea->pack(-fill => 'both', -expand => 'yes'); $mainarea->configure(-background => "#AAAAAA",); # Define updates to main window # ----------------------------- # FILESYSTEMS sub fs_sub { $mainarea->createText(10, 10, -text => "Filesystem Information:", -anchor => 'w'); }; # MEMORY sub mem_sub{ $mainarea->createText(10, 10, -text => "Memory Information:", -anchor => 'w'); };
The problem is, once I make a menu choice that draws the text (in each subroutine), then go to choose another menu item that draws text, the canvas isn't cleared before the new text is drawn. How can I simple revert the canvas to it's original state? There doesn't seem a decent way to do this.
thanks!
Kickstart
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl/Tk canvas clearing
by ariels (Curate) on Dec 02, 2001 at 12:43 UTC | |
by Kickstart (Pilgrim) on Dec 02, 2001 at 22:37 UTC |