On Tue, 05 Feb 2008 11:43:55 -0600, Chris wrote:
> I'm a perl Tk newbie trying to create a pgm to display the status of
> several servers by a green/red indicator light. After going over some
> howto's & examples, I'm still stumped.
>
> All of the examples I can find are geared towards dealing with some user
> interaction (clicking buttons, typing text, etc.), but I'm looking for a
> non-interactive update of status lights, say when a server goes down,
> stops listening on a port, etc.
>
> Basically I'd like to know how to update a widget color based on results
> from a monitoring subroutine - ie how to pass info back into the Tk
> window. I tried setting a text widget to a global variable that gets
> manipulated in a routine forked prior to MainLoop, but no luck.
>
> Sooooo....can anybody provide guidance as how to pass values back into a
> Tk window? Examples greatly appreciated..
>
> TIA
It may be easier to destroy and recreate a widget, eg. in a different
color, than to change the color of an existing widget, and it looks
exactly the same.
|