Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: perl Tk focus question

by dree (Monsignor)
on Aug 22, 2002 at 22:20 UTC ( [id://192193]=note: print w/replies, xml ) Need Help??


in reply to perl Tk focus question

You can use the grab() function for the second window.
See the example below:
use strict; use Tk; my $mw = MainWindow->new( -height => 385, -width => 575); $mw->title ("Example"); #---------- Adding Button my $button = $mw->Button( -text => "Click me!", -relief => "raised", "-command"=>\&Click_me, ); $button->place( -x => 215, -y => 295, -height => 22, -width => 90); MainLoop; sub Click_me { my $mw2 = $mw->Toplevel( -height => 123, -width => 245); $mw2->title (""); $mw2->grab(); }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://192193]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-04-23 12:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found