Tk::Icon - Change Icon of Tk-Windows under Win32


NAME

Tk::Icon - Change Icon of Tk-Windows under Win32


SYNOPSIS

  use Tk;
  use Tk::Icon;

  my $mw = MainWindow->new;
  $mw->setIcon(-file => 'usa.ico');

  MainLoop;


DESCRIPTION

Tk::Icon imports the setIcon-function into the Tk::Toplevel-Package and provides to change the Icon of a Toplevel-window under Win32.

At the moment, there is no possibility to manipulate the Icon using configure/cget or to destroy it. See TODO.

I've tested it under Windos 98SE and Windows 2000 using Perl 5.6.0 and Tk 800.022 only, but it should work under all Win32-compatible operating systems because it uses documented Win32-API-Calls.


METHODS

At the moment, there is only one method supplied:

setIcon(-file => filename)
-file
Specififes the Icon to display in the window's title bar. The ICO-File must supply an 16x16-Image that will be displayed in the upper left corner of the window. You can additionally supply an 32x32-Image that will be displayed in the so-called Task-Switcher (that one that comes up when you press Alt-Tab).

When you later in the program call this method again, the previous icon will be destroyed and the new one will be loaded.


TODO


VERSION HISTORY


AUTHOR

Martin Schmuker, martin@schmuker.de

 Tk::Icon - Change Icon of Tk-Windows under Win32