Tk::Statusbox - A recolorable status area that also can flash |
Tk::Statusbox - A recolorable status area (box) that also can flash
use Tk; use Tk::Statusbox
my $mycolor = 'red'; my $mw = MainWindow->new();
my $stbox = $mw->Statusbox( -variable => \$mycolor, -command => \&status_changed_cb, -flashintervall => '100', # time in msecs -height => '30', -width => '50', #-relief => 'sunken', #-bg => 'blue', )->pack;
Tk::MainLoop; sub test_cb { print "status_changed_cb called with [@_], \$mycolor = >$mycolor<\n"; #$stbox->color('red'); $mycolor = 'orange'; }
A cavas/frame style widget that uses a recolorable indicator box with configurable flashing. Useful as an indicator field for common status operations, suitable for perl Tk800.x (developed with Tk800.024).
You can tie a scalar-value to the Statusbox widget, immediate recolor it with '-color' option, assign a callback, that is invoked each time the Statusbox' color is changed, resize it with '-height' and '-width', as well as set the flashintervall with '-flashintervall' and configure any of the options understood by Tk::Frame(s) like -relief, -bg, ... .
clear()
method).
clear()
method).
Michael Krause, KrauseM_AT_gmx_DOT_net
This code may be distributed under the same conditions as Perl.
V1.0 (C) October 2002
Tk::Statusbox - A recolorable status area that also can flash |