<?xml version="1.0" encoding="windows-1252"?>
<node id="1014459" title="Perl/Tk window contents disappear when obscured then revealed" created="2013-01-21 10:06:59" updated="2013-01-21 10:06:59">
<type id="115">
perlquestion</type>
<author id="1014455">
Another Ed</author>
<data>
<field name="doctext">
I am having problems with Perl/Tk windows.  Certain ones have the feature that if you obscure them with another window - wholly or partially - then reveal them again, the window contents are missing - wholly or partially again.  I have found this with both mySplashScreen and Message windows.  How can I avoid this happening, or is this a "feature" of these objects?  Sample code I have been using:
&lt;c&gt;use Tk;
require Tk::mySplashScreen;

use strict;
use warnings;
 
my $s = mySplashScreen -&gt; new
(
    -image =&gt; '',
    -text =&gt; 'testing, one, two, three...'
);
for my $n (1 .. 10)
{
    print "$n\n";
    sleep 1;
}
$s -&gt; destroy;&lt;/c&gt;

And:
&lt;c&gt;use Tk;

use strict;
use warnings;

my $mw = MainWindow -&gt; new;
my $m = $mw -&gt; Message (-text =&gt; "testing, one, two, three...") -&gt; pack;
$m -&gt; update;
for my $n (1 .. 10)
{
    print "$n\n";
    sleep 1;
}
$m -&gt; destroy;
print "Done\n";&lt;/c&gt;

If this feature is unavoidable for these objects, is there an alternative type I can use?  All I am trying to do is display a message window that remains on the screen while a called application (a scanner program) runs.  I cannot believe how difficult it is to achieve something so basic.  I have tried Google and turned up nothing for this.  </field>
</data>
</node>
