Tk::StayOnTop - Keep your window in the foreground |
Tk::StayOnTop - Keep your window in the foreground
use Tk::StayOnTop; $toplevel->stayOnTop; $toplevel->dontStayOnTop;
Adds methods to the Tk::Toplevel base class so that a window can stay on top off all other windows.
The module uses a number of methods for trying to keep the window in the foreground. It will atomatically choose the most suitable available. The methods can be split between Microsoft Windows and X-Windows:
On older Perl Tk versions, the module will search for the Win32::API module and use direct API calls to the OS.
If this is not implemented, it will just try to the raise window every time it's covered. This could cause problems if you have two windows competing to stay on top.
I am hoping that the Perl Tk build in ``-toplevel => 1'' attribute will be implement in the future and this module will no longer be needed. However in the mean time, if you have any other platform dependent solutions, please let me know and I will try to include them.
See limits in X-Windows functionality descibed above.
This module is Copyright (c) 2004 Gavin Brock gbrock@cpan.org. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Many thanks to Slaven Rezic for his many implemntation suggestions.
Tk
Tk::StayOnTop - Keep your window in the foreground |