Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display momentary messagebox that disappears?

Status
Not open for further replies.

sarta

Programmer
Nov 3, 2006
29
Using tk on linux, I want to display a messagebox for a second, then have it disappear without human interaction, either by a 1 second timeout or by closing the window in my perl script.

How can I do that? Here is what I have now (since it loops o MainLoop() I don't know how to timeout or close it inside the program)

use Tk;
$mw = MainWindow->new;
$mw->Button( -text => 'Hello World', -command => sub{exit} )->pack;
$mw-popup;
MainLoop;
 
I don't speak PERL, but in Tcl I would think
after 1000 "destroy <name of window to close>"

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top