#!/usr/bin/perl -w use strict; use Tk; my $mw = MainWindow->new( -title=>"Foo!", ); ### '-container' property needs to be true my $f = $mw->Frame( -width=>400, -height=>400, -container => 1, )->pack; $\ = "\n"; print "Tk is $Tk::VERSION; Window id is ", $f->winfo('id'); ### add the following line, change the -use line below my $winfo = hex $f->winfo('id'); my $child = $mw->Toplevel( -title => "Bar!", -use => $winfo, ); $child->Label( -text=>"Bar!", )->pack; MainLoop(); __END__ output: Tk is 800.023; Window id is 0xff0344