Greetings Daniel,
you need to use the StayOnTop module. It is not included in the stock
distribution so you need to PPM it or download and install it. I think it is an
easy one to install. Here is a test script that seems to work.
use strict;
use Tk;
use Tk::StayOnTop;
my $on_top = 0;
my $maintitle = "Test Stay On Top";
my $backcolor = "#DCA5FF";
my $mw = MainWindow->new(
-background=> "$backcolor",
-borderwidth=>4,
-relief=>'ridge');
$mw-> title ($maintitle);
my $bodytext_font = $mw->fontCreate(-family=>"times",-size => 14);
my $canvas = $mw->Scrolled('Canvas',-height => 100, -width =>200)->pack();
my $c = $canvas-> Subwidget("canvas");
my $bttn = $c-> Button(-text => "On Top", -background=>'pink', -command =>
\&on_top);
my $id = $c-> createWindow(100, 75, -window => $bttn);
sub on_top{
if ($on_top == 0){
$on_top = 1;
$mw->stayOnTop;
$mw->update;
}
else {
$on_top = 0;
$mw->dontStayOnTop;
$mw->update;
}
}
MainLoop;
Tuesday, February 26, 2008, 6:22:36 AM, you wrote:
DB> Hi,
DB> I have an application wherein it calls a tk window asking the user
DB> to fill a form.
DB> I need this tk window to be always on top. how do i do it with TK?
DB> Or do I use a separate module for doing this (GUITest)?
DB> Dan
--
Best regards,
Spencer Chase mailto:[EMAIL PROTECTED]
67550 Bell Springs Rd.
Garberville, CA 95542 Postal service only.
Laytonville, CA 95454 UPS only.
[EMAIL PROTECTED]
http://www.spencerserolls.com
http://www.spencerserolls.com/MidiValve.htm
(707) 984-8356
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs