in reply to display information in the box in a notification area
.... if you can use Gtk2, see Gtk2::StatusIcon Demo#!/usr/bin/perl -w use strict; use Tk; my $mw = tkinit; my $notification = $mw->Toplevel(); $notification->geometry('+400+400'); $notification->withdraw; # Hide display window $notification->protocol('WM_DELETE_WINDOW' => sub { }); #$notification->overrideredirect(1); # Remove window decorations $notification->Label( -text => 'Your message displayed here.', -foreground => 'white', -background => 'black', -height => 5 )->pack; $mw->Button( -text => 'Display Notification Window', -command => \&display_note )->pack; MainLoop; sub display_note { $notification->deiconify; $notification->raise; # this is where you setup a condition to withdraw it $notification->after( 5000, \&hide_note ); } sub hide_note { $notification->withdraw; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: display information in the box in a notification area
by abubacker (Pilgrim) on Dec 24, 2009 at 04:46 UTC | |
by zentara (Cardinal) on Dec 24, 2009 at 12:58 UTC | |
by abubacker (Pilgrim) on Dec 26, 2009 at 06:57 UTC | |
by zentara (Cardinal) on Dec 27, 2009 at 15:10 UTC |