~ubuntu-branches/ubuntu/maverick/perl-tk/maverick

« back to all changes in this revision

Viewing changes to Tk/ProgressBar.pm

  • Committer: Bazaar Package Importer
  • Author(s): Colin Tuckley
  • Date: 2010-05-30 09:19:40 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100530091940-wbmq9bloo92t9m6x
Tags: 1:804.029-1
* New Upstream Release (Closes: #578814).
* Added debian/watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
package Tk::ProgressBar;
2
2
 
3
3
use vars qw($VERSION);
4
 
$VERSION = '4.011'; # was: sprintf '4.%03d', q$Revision: #10 $ =~ /\D(\d+)\s*$/;
 
4
$VERSION = '4.014'; # was: sprintf '4.%03d', q$Revision: #10 $ =~ /\D(\d+)\s*$/;
5
5
 
6
6
use Tk;
7
7
use Tk::Canvas;
298
298
sub variable {
299
299
    my $c = shift;
300
300
    my $oldvarref = $c->{'-variable'};
301
 
    my $oldval = $$oldvarref if $oldvarref;
 
301
    my $oldval; $oldval = $$oldvarref if $oldvarref;
302
302
    if(@_) {
303
303
        my $varref = shift;
304
304
        if ($oldvarref)
334
334
    use Tk::ProgressBar;
335
335
 
336
336
    $progress = $parent->ProgressBar(
337
 
        -width => 200,
338
 
        -length => 20,
 
337
        -width => 20,
 
338
        -length => 200,
339
339
        -anchor => 's',
340
340
        -from => 0,
341
341
        -to => 100,
450
450
=item B<-variable>
451
451
 
452
452
Specifies the reference to a scalar variable to link to the ProgressBar.
453
 
Whenever the value of the variable changes, the ProgressBar will upate
 
453
Whenever the value of the variable changes, the ProgressBar will update
454
454
to reflect this value. (See also the B<value> method below.)
455
455
 
456
456
=item B<-value>
457
457
 
458
 
The can be used to set the current position of the progress bar
 
458
This can be used to set the current position of the progress bar
459
459
when used in conjunction with the standard C<configure>. It is
460
460
usually recommended to use the B<value> method instead.
461
461