Tk Source Code

View Ticket
Login
Ticket UUID: 220873
Title: Making the Tk toplevel window a child windows of my Win32 app
Type: Bug Version: obsolete: 8.2.1
Submitter: welch Created on: 2000-11-01 01:32:19
Subsystem: 68. Win Window Operations Assigned To: nobody
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2003-01-19 17:27:39
Resolution: Invalid Closed By: hobbs
    Closed on: 2003-01-19 10:27:39
Description:
OriginalBugID: 3381 RFE
Version: 8.2.1
SubmitDate: '1999-11-05'
LastModified: '2000-01-27'
Severity: SER
Status: UnAssn
Submitter: techsupp
ChangedBy: hobbs
OS: Windows NT
OSVersion: 4.0 sp3


Name:
Joris J. Röling

Extensions:
none

DesiredBehavior:
We would like to have the Tk toplevel window to be a child window of a
    (native) Win32 app. I did experiment with the '-use 0x<window handle>'
    argument of Wish, with my Win32 window as target, or another Wish
    instance (even with a frame that had the '-container' flag set), but it
    all left me in the dark. Let me tell you what we want:
    
    Like the Tclsh (which is perfectly embedable), we would like to use Tk
    as *part* of the (user extendible) UI of our applications. So our
    application does the main UI itself (native Win32), but should offser
    our end-user the option to extend the I using Tcl/Tk. In our idea, a
    child window should be made by our Win32 app, a thread be started (so
    that Tk can do it's MainLoop), and the window handle should be given to
    Tk, so it knows its parent window. From there on, the end-user can start
    Tcl/Tk scripts that will reflect it's UI on this parent window. I'm sure
    this must be possible, but the documentation is (as far as I know) not
    very elaborate on this subject.
    
    To sum it up: We would like to use Tk without it being a 'toplevel'
    window.
    
    (Please ask if I have explained myself badly, I'll rephrase the
    question)
    
    Cheers,
    Joris
User Comments: hobbs added on 2003-01-19 17:27:39:
Logged In: YES 
user_id=72656

See how the Tk browser plugin works to do just this by 
embedding itself in IE or Mozilla.