[URGENT]: Embedded toplevels from different processes & geometry management (windows)...

From: Georgios Petasis (petasis_at_iit.demokritos.gr)
Date: 11/29/04


Date: Mon, 29 Nov 2004 02:30:39 +0200

Hi all,

I have a tk app, whose main window has to be embedded inside a toplevel
of another tk app, under windows. This is easy with the -use/-container
frame/toplevel options. However, it seems that there is a problem
when the dimensions of the container window change, as the embedded
window is not notified.

In particular, embedding a toplevel from the same process as the
container frame/toplevel works fine. When the container gets
resized, the embedded window is notified & resized correctly.
But if the embedded window belongs to a different process,
it is not notified when the container is resized, thus keeping
its original dimensions. If the container window is resized,
the only way to propagate this change to an embedded
window from a foreign process, is to generate a configure
event for the window in the foreign process.

Am I missing something? Is there a workaround?
An easy way to see the problem is:

set file [open empty.tcl w]
puts $file {. configure -background yellow; after 1000 "event generate .
<Configure>"}
close $file
toplevel .x -container 1
exec [info nameofexecutable] -use [winfo id .x] empty.tcl &

The yellow area (thus the toplevel of the second wish) is not visible.
Any ideas?

George



Relevant Pages