in reply to Tk- Image Flashing for few seconds

From what I remember of Tk (some time now) - don't use sleep, since that messes with Tk internals. Use Tk::after (the manual page should be in the Tk docs), something like
${$prev_clicked_button} -> after (2000, [\&hide, ${$prev_clicked_b +utton} ]); ${$clicked_button} -> after (2000, [\&hide, ${$clicked_button +}]);
sub hide { shift -> configure (-image => undef); }

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^2: Tk- Image Flashing for few seconds
by sanPerl (Friar) on Nov 25, 2006 at 06:11 UTC
    Great this solved my problem
    SanPerl