Tk terminal window 
Author Message
 Tk terminal window

I have an app I'm developing with Perl/Tk but I really need an embeded term
window in the tk form.  I've tried putting a entry widget that fires off a
comand an puts it's output to a text entry widget but this really doesn't
work well for some of the interactive scripts called.  Anyone done a full
terminal or seen a module that will d a full xterm widget ?

Thanks,

Joel McCarty



Mon, 22 Jul 2002 03:00:00 GMT  
 Tk terminal window

Quote:

> I have an app I'm developing with Perl/Tk but I really need an embeded term
> window in the tk form.  I've tried putting a entry widget that fires off a
> comand an puts it's output to a text entry widget but this really doesn't
> work well for some of the interactive scripts called.  Anyone done a full
> terminal or seen a module that will d a full xterm widget ?

Since emulating all the screen control commands used by libtermcap is
complicated, the best approach is to start up an xterm or rxvt,
capture it and use -use => <Window ID> -- From man Tk::Toplevel :

Switch:   -use
    This option is used for embedding. If the value isn't an empty
    string, it must be the the window identifier of a container
    window, specified as a hexadecimal string like the ones returned
    by the winfo id command. The toplevel widget will be created as a
    child of the given container instead of the root window for the
    screen.  If the container window is in a Tk application, it must
    be a frame or toplevel widget for which the -container option was
    specified.  This option may not be changed with the configure
    method.

[end quote]

Quoting from a letter Nick Ing-Simmons sent to the Perl/Tk mailing

15 Jun 1999 :

Quote:
> Is there any module (yet) which can emulate an "xterm" or "hpterm"
> window within a Tk application?  To clarify, I want to use a "real"
> xterm/hpterm window but have it embedded within the perl/Tk window.

As of Tk800.??? it is possible to embed another xwindow in a Tk app
(or vice versa) provided app. can be told which window to draw in from
command line, or it can (with some startup messiness) be re-parented
from 'root' into Tk window (typically a Frame).
[snip]

There was a posting to comp.lang.perl.tk recently that showed how to
do this -- I forgot to snip it, but it should be available on
www.deja.com

Hope this helps.



Tue, 23 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Associating Tk Windows with non-Tk windows

2. perl exec on windows loses controlling terminal?

3. Accessing windows terminal server

4. Splitting terminal window in 2 with perl

5. detecting terminal window size

6. echoing commands to the calling terminal window

7. pty terminal control and IPC via pseudo-terminal devices

8. Tk :: logo on top and terminal on background

9. Does Perl/Tk do text-based terminals?

10. Tk syntax on VT420 terminal

11. Showing a Tk window using Activeperl and SOAP on windows

12. Nonmember submission: Re: Showing a Tk window using Activeperl and SOAP on windows

 

 
Powered by phpBB® Forum Software