For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > December 2006 > Bringing a window to foreground.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Bringing a window to foreground.
rajendra

2006-12-28, 8:00 am

Hello All,
Please find my small script.

use Tk;
$main=MainWindow->new;
$main->Button(-text => "Click",-command => \&disp)->pack(-side =>'left');
$text1=$main->Text(-width => 40 ,-height => 2)->pack;
$text1->bind('<Enter>',\&disp);

$main->after(500,sub{$main->attributes(-topmost=> 1)});
# this works on windows

MainLoop;

sub disp
{
$text1->insert('end',"Hello");
}

What should I add for this script to bring the window that gets generated
by
this script to foreground even if I change my focus?..


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com