Version 6 of How to embed a non-Tk GUI into a Tk frame

Updated 2004-11-29 13:12:58 by lwv

Purpose: to collect tips, suggestions, questions, and examples where developers have written tcl/tk code that wraps around an existing GUI window.

In particular, I'm interested in hearing people talk about doing this under the X Window System.

Has anyone an example, for instance, of embedding perhaps an xterm inside a tcl/tk frame?

Why? Well, perhaps, for example, to have an application to which one could easily add buttons for generating key sequences or command strings, etc.


[Larry, if no one else helps, and I don't otherwise make time for this, e-mail CL. I think I know what you're after.]

Thanks. A developer here is wanting to use something like this and then to set transient wm hints via tk, to get certain behavior characteristics to take place.


See BLT's 'container' command. From the man page...

The container widget lets you embed an X11 window from a foreign application into your Tk application. The foreign window is reparented inside of the widget. You can then place and arrange the container just as you would any Tk widget.

- Marty Backe -- 24 Nov 2004


See the page about the TkXext extension at http://wiki.tcl.tk/2116 It's a compiled Tcl/Tk extension. I think it only works on X11 on Unix/Linux. But you can embed non-Tcl/Tk windows inside a Tk frame with it. I used it in a project on Slackware 7.2 Linux with Tcl/Tk 8.4 and it worked well.


LV Has anyone used the frame -container option to do this sort of thing?


Category GUI