Re: ProgressBar Examples

From: Dmitry Karasik <dmitry_at_karasik.eu.org>
Date: 07 Aug 2005 15:48:54 +0200
To: prima_at_prima.eu.org

        Hi Brian!

On 06 Aug 05 at 03:47, "Brian" (Brian Fredette) wrote:

 Brian> Greetings, Does anyone have any examples of creating a progress
 Brian> bar?

use strict;
use Prima qw(Application Sliders);

my $window = Prima::MainWindow-> create(
        size => [ 200, 100]
);
my $bar = $window-> insert( 'Prima::Gauge',
        pack => { fill => 'both'},
        value => 50,
);
$window-> insert( 'Prima::Timer' =>
        timeout => 50,
        onTick => sub {
                $bar-> value( $bar-> value >= 100 ? 0 : $bar-> value + 5);
        },
)->start;

run Prima;

-- 
Sincerely,
	Dmitry Karasik
---
catpipe Systems ApS
*BSD solutions, consulting, development
www.catpipe.net
+45 7021 0050  
Received on Sun 07 Aug 2005 - 15:48:56 CEST

This archive was generated by hypermail 2.2.0 : Sat 19 Mar 2011 - 18:35:06 CET