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


Tk-ProgressBar-Mac documentation  | view source Contained in the Tk-ProgressBar-Mac distribution.

Index


NAME

Top

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

SYNOPSIS

Top

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

DESCRIPTION

Top

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

Top

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

Top

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

Top

 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

Top

KEYWORDS

Top

Apple, ProgressBar


Tk-ProgressBar-Mac documentation  | view source Contained in the Tk-ProgressBar-Mac distribution.