The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Tk::AppWindow::Ext::StatusBar - adding a status bar

SYNOPSIS

 my $app = new Tk::AppWindow(@options,
    -extensions => ['StatusBar'],
 );
 $app->MainLoop;

DESCRIPTION

Add a status bar to your application.

CONFIG VARIABLES

-statusbarpanel

Default value 'BOTTOM'. Sets the name of the panel home to StatusBar.

-statusbarvisible

Default value 1. Show or hide status bar.

-statusitemborderwidth

Default value 2.

-statusitempadding

Default value 2.

-statusitemrelief

Default value 'groove'.

-statusmsgitemoninit

Default value 1.

-statusupdatecycle

Default value 500. Repeat time for updating the items on the status bar.

METHODS

Add($type, $name, @options)

Adds an item to the status bar. $type can have the values image, message, progress, text

@options is a paired (switch => value) list. General options are listed here. See type methods below for type specific options.

-label

Specify the text of the label. If this option is set it will create a label next to the item on the statusbar.

-itempack

Default value [-side=> 'left', -padx => 2, -pady => 2].

-position

Specify the numerical position the item should be placed.

-updatecommand

Specify a callback that returns the value for this item.

AddImageItem($name, @options)

Almost the same as Add('image', $name, @options). In the options -valueimages you specify icon names. Extension Art must be loaded for this. You can specify all the options for a Tk::Label and the following:

-valueimages

Specify a hash ref. Example;

    {
       0 => $w->Bitmap('error'),
       1 -> $w->Bitmap('transparent')
    }
AddMessageItem($name, @options)

Same as Add('message', $name, @options) You can specify all the options for a Tk::Label.

AddProgressItem($name, @options)

Same as Add('progress', $name, @options) You can specify all the options for a Tk::ProgressBar.

AddTextItem($name, @options)

Same as Add('text', $name, @options) You can specify all the options for a Tk::Label.

Delete($name)

Removes $name from the status bar and destroys the item object.

Item($name)

Returnes the item object for $name.

ItemExists($name)

Returnes true if $name exists.

Message($text)

Display $text on the message item in the status bar if it exists. The message will be deleted upon the first key stroke or mouse click.

AUTHOR

Hans Jeuken (hanje at cpan dot org)

BUGS

Unknown. If you find any, please contact the author.

SEE ALSO

Tk::AppWindow
Tk::AppWindow::BaseClasses::Extension
Tk::AppWindow::BaseClasses::PanelExtension