Associating Tk Windows with non-Tk windows 
Author Message
 Associating Tk Windows with non-Tk windows

Is there anyway to make a Tk window behave as if it is a child of any
other window?  I am using Perl/Tk to write an application that links to
another application via a plug-in with IPC.  I'm trying to make the
Perl/Tk GUI feel as if it is part of the host application it is
connected to.  Whenever the user selects works in the other GUI, the
Perl/Tk window ends up hidden behind the other application.  Windows
that are created within the host application do not behave this way.  
They always remain in front of the application's main window.  The
Tk::Wm has method named "group()" that looks like it might help.  Is it
possible to pass it a handle of some window external to my application?

Rev

-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the



Sun, 22 Feb 2004 10:22:37 GMT  
 Associating Tk Windows with non-Tk windows

Quote:

> Is there anyway to make a Tk window behave as if it is a child of any
> other window?  I am using Perl/Tk to write an application that links to
> another application via a plug-in with IPC.  I'm trying to make the
> Perl/Tk GUI feel as if it is part of the host application it is
> connected to.  Whenever the user selects works in the other GUI, the
> Perl/Tk window ends up hidden behind the other application.  Windows
> that are created within the host application do not behave this way.  
> They always remain in front of the application's main window.  The
> Tk::Wm has method named "group()" that looks like it might help.  Is it
> possible to pass it a handle of some window external to my application?

Toplevels have a -use option.  Give it a window id and the Toplevel
embeds within that window.
HTH
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the



Sun, 22 Feb 2004 20:22:55 GMT  
 Associating Tk Windows with non-Tk windows

Quote:


>> Is there anyway to make a Tk window behave as if it is a child of any
>> other window?  I am using Perl/Tk to write an application that links
>> to another application via a plug-in with IPC.  I'm trying to make
>> the Perl/Tk GUI feel as if it is part of the host application it is
>> connected to.  Whenever the user selects works in the other GUI, the
>> Perl/Tk window ends up hidden behind the other application.  Windows
>> that are created within the host application do not behave this way.  
>> They always remain in front of the application's main window.  The
>> Tk::Wm has method named "group()" that looks like it might help.  Is
>> it possible to pass it a handle of some window external to my
>> application?

> Toplevels have a -use option.  Give it a window id and the Toplevel
> embeds within that window.
> HTH

This sounds like what I want, but how do I get the window id of an
external application?  Does it have to an application using Tk?  I would
like to use a window that is not written in Perl/Tk as the parent.

Rev

-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the



Mon, 23 Feb 2004 15:16:35 GMT  
 Associating Tk Windows with non-Tk windows

Quote:



>>> Is there anyway to make a Tk window behave as if it is a child of any
>>> other window?  I am using Perl/Tk to write an application that links
>>> to another application via a plug-in with IPC.  I'm trying to make
>>> the Perl/Tk GUI feel as if it is part of the host application it is
>>> connected to.  Whenever the user selects works in the other GUI, the
>>> Perl/Tk window ends up hidden behind the other application.  Windows
>>> that are created within the host application do not behave this way.  
>>> They always remain in front of the application's main window.  The
>>> Tk::Wm has method named "group()" that looks like it might help.  Is
>>> it possible to pass it a handle of some window external to my
>>> application?
>> Toplevels have a -use option.  Give it a window id and the Toplevel
>> embeds within that window.
>> HTH
> This sounds like what I want, but how do I get the window id of an
> external application?  Does it have to an application

                                   ^be

No. indeed, that's the basis of the PerlPlus Netscape plugin, and how Tk
windows are embedded in
the browser. The browser advertises its own XID in a Perl hash, and the
plugin the -use'es that.

Quote:
>  using Tk?  I would like to use a window that is not written in Perl/Tk
> as the parent.

How to get the XID is always the hard part, but I'm sure others on this
list have better answers than I.
I'm pretty sure as a last resort you can use xdpyinfo.  I have no idea
on Win32.
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the



Mon, 23 Feb 2004 21:33:22 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Embedding non-Tk windows within a Perl/Tk Application

2. managing non-Tk windows

3. x-windows in perl/Tk windows?

4. Showing a Tk window using Activeperl and SOAP on windows

5. Nonmember submission: Re: Showing a Tk window using Activeperl and SOAP on windows

6. Non-Tk parent window possible?

7. perl/tk on windows

8. Perl Tk making toplevel windows

9. Tk causes perlglob windows in NT

10. perl/tk and fork command on windows

11. Tk.pm on Windows 2000

12. multiple windows using Perl/Tk

 

 
Powered by phpBB® Forum Software