in reply to Perl/Tk + CSSH
Here is the simplest example possible. When doing this sort of thing, you may experience glitches in keyboard or mouse focus, but you likely will be lucky.
#!/usr/bin/perl use strict; use Tk; my $mw = MainWindow->new( -bg => 'white' ); $mw->geometry('400x400' . '+100+100'); my $frame1 = $mw->Frame( -height => 30, -bg => 'lightblue', )->pack( -fill => 'x', -side => 'top' ); my $frame; my $button = $frame1->Button( -text => 'Open window', -command => sub { open_w($frame) }, )->pack; $frame = $mw->Frame( -container => 1, -bg => 'white', -relief => 'sunken', -bd => 2, )->pack( -fill => 'y', -side => 'left' ); MainLoop(); sub open_w { my ($f) = @_; my $id = sprintf hex $f->id; my $t = $mw->Toplevel( -use => $id ); system("xterm -into $id &"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl/Tk + CSSH
by Monkless (Acolyte) on Feb 08, 2012 at 13:42 UTC | |
by Monkless (Acolyte) on Mar 06, 2012 at 09:14 UTC |