in reply to How to embed other GUI into Tk application

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.

  • Comment on Re: How to embed other GUI into Tk application

Replies are listed 'Best First'.
Re: Re: How to embed other GUI into Tk application
by svad (Pilgrim) on Apr 26, 2002 at 06:07 UTC
    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>