Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: print output to screen in table that updates?

by zentara (Archbishop)
on Nov 09, 2012 at 11:36 UTC ( #1003104=note: print w/ replies, xml ) Need Help??


in reply to print output to screen in table that updates?

Are you stuck on Text::Table and console mode? It seems that an event-based gui might be useful too. Like Tk or Gtk2 or Wx.

With a GUI you could make a nice Table display, and upgrade progress thru the Table. Here is a simple example to show you what it might look like.

#!/usr/bin/perl use strict; use warnings; use Tk; use Tk::TableMatrix; my $top = MainWindow->new; my $stuff = {}; my $tg = $top->Scrolled( 'TableMatrix', -rows => 21, -cols => 11, -width => 10, -height => 20, -titlerows => 1, -titlecols => 1, -variable => $stuff, -selectmode => 'extended', -resizeborders => 'both', -titlerows => 1, -titlecols => 1, -bg => 'white', )->pack( -expand => 1, -fill=>'both' ); $tg->tagConfigure('active', -bg => 'gray90', -relief => 'sunken') + ; $tg->tagConfigure('title', -bg => 'gray85', -fg => 'black', -relief => + 'sunken') ; $top->Button( -text=>'modify', -command=> sub { $stuff->{'3,3'} = 'asfasf'; #&TMRefresh($tg); $tg->configure(-padx =>( $tg->cget(-padx))); }, )->pack; Tk::MainLoop; sub TMRefresh { #Required input TableMatrix object. #use to force matrix to update, a code trick return if (!$_[0]); $_[0]->configure(-padx =>($_[0]->cget(-padx))); } ###################################################################### +###

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh


Comment on Re: print output to screen in table that updates?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003104]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2015-07-04 01:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls