The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Tk::ProgressBar::Mac - a blue, 3-D Macintosh Classic progress bar.

SYNOPSIS

 use Tk::ProgressBar::Mac;
 $pb = $parent->ProgressBar(-option => value);

DESCRIPTION

This widget provides a dynamic image that looks just like a Mac OS 9 progress bar. Packed around it are four Frames, north, south, east and west, within which you can stuff additional widgets. For example, see how Tk::Copy::Mac uses several Labels and a CollapsableFrame widget to create a reasonable facsimile of a Macintosh copy dialog.

The following option/value pairs are supported:

-width

The maximun width of the Progressbar.

METHODS

reset

Resets the progress bar image so that it appears unused (a $pb->set(0) still shows the bar's base and end cap).

set($percent)

Sets the width of the progress bar, as a percentage of -width.

ADVERTISED WIDGETS

Component subwidgets can be accessed via the Subwidget method. Valid subwidget names are listed below.

Name: label, Class: Label
  Widget reference of the Label containing the ProgressBar
  Photo image.
Name: tframe, Class: Frame
  Widget reference of the Frame north the ProgressBar.
Name: bframe, Class: Frame
  Widget reference of the Frame south the ProgressBar.
Name: lframe, Class: Frame
  Widget reference of the Frame west the ProgressBar.
Name: rframe, Class: Frame
  Widget reference of the Frame east the ProgressBar.

EXAMPLE

 use Tk;
 use Tk::ProgressBar::Mac;
 use strict;

 my $mw = MainWindow->new;
 my $pb = $mw->ProgressBar(-width => 150, -bg => 'cyan')->pack;

 while (1) {
     my $w = rand(100);
     $pb->set($w);
     $mw->idletasks;
     $mw->after(250);
 }

AUTHOR and COPYRIGHT

sol0@Lehigh.EDU

Copyright (C) 2000 - 2003, Stephen O. Lidie.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

KEYWORDS

Apple, ProgressBar