Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

How to embed other GUI into Tk application

by svad (Pilgrim)
on Apr 25, 2002 at 18:41 UTC ( [id://162067]=perlquestion: print w/replies, xml ) Need Help??

svad has asked for the wisdom of the Perl Monks concerning the following question:

Hello, all!
I am trying to embed into perl/Tk application some other GUI, which I am developing.
Tk manpages says that about -container option for Frame() widget, and also mentions that "window will support the appropriate window manager protocols for things like geometry requests."
Does anyone knows where to get information what namely must support my newly created GUI program?

If anyone succeeded embedding non-Tk program into Tk-program, please share your experience!

Best wishes,
Vadim.

  • Comment on How to embed other GUI into Tk application

Replies are listed 'Best First'.
Re: How to embed other GUI into Tk application
by graff (Chancellor) on Apr 26, 2002 at 04:19 UTC
    I realize it's bad form for me to ask a question in response to a question, so please forgive me, but... what benefit do you hope to get by embedding a non-Tk GUI (which you create) inside a widget of a Perl-Tk program?

    Is your non-Tk GUI set up so it can also work by itself (not inside a Tk widget)? If so, and you are looking for a way to make its output accessible to an "outer" Perl-Tk GUI, why not run the "inner" GUI as a pipeline file handle

    open(MYGUI,"inner-gui |");
    then setup a
    Tk::Event->fileevent
    for that file handle? This would seem to keep everything simpler, and might perform better -- both GUI's do their normal thing, both are handled by the main window manager.

    If do have a compelling reason for the "embedded GUI apps" approach, I'd be very interested to learn more about that sort of situation.

      in my case non-Tk GUI is not a standalone independent program, but rather specially written for this case.

      If I write GUI using Tk, I prefer using it in a most portable way, i.e. without non-portable additions like external inclusions.

      But here I am tempting to do several different kinds of things. <bl>

    • 1. extend Tk GUI functionality by creating non-Tk widget with a native to current platform widget, for example Borland VCL or CLX, for example, data-aware widgets
    • 2. opposite case (after I'll understand underlying mechanics)
      to enrich my other Win32 GUI application with a powerfullest Text widget I ever saw, as well as other well-done Tk widgets.
    • 3. everything else I've forgot to mention :) </bl>
Re: How to embed other GUI into Tk application
by {NULE} (Hermit) on Apr 26, 2002 at 00:59 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2024-04-19 12:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found