Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with focus on window

Status
Not open for further replies.

julie25

Programmer
Aug 7, 2003
22
FR
Hi,

I create a toplevel and I'm looking a fast way to put the focus on it.

I have:
$mw = mainwindow->new;
$tl = $mw_>toplevel;
#construction of the toplevel (...)
$tl2 = $tl->toplevel

For the moment, I'm using the raise function... but it's not very nice:
$tl ->raise($mw)...

I would prefere something that keeps the priority on my window...

If you know something about it...
thanks!

Julie
 
Have you tried :

$widget -> focus;

there is plenty of other ways to focus a widget.

EX: *$toplevel*->focusmodel(?active|passive?)

all this is in the TK documentation.
 
'focus' is focus of the keyboard...

I'd like my toplevel to be before my mainwindow (first plan..) and
I'm no sure it's a problem of 'focus'.

But I'm going to try with 'focus'..

thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top