From: pvhp@lns62.lns.cornell.edu (Peter Prymmer)
Newsgroups: comp.lang.perl.tk,comp.lang.perl.announce,comp.answers,news.answers
Subject: comp.lang.perl.tk FAQ
Followup-To: comp.lang.perl.tk
Date: Sat May 31 16:48:37 1997
Approved: news-answers-request@MIT.EDU
Summary: comp.lang.perl.tk Frequently Asked Questions.
Archive-name: perl-faq/ptk-faq
Posting-Frequency: monthly
Last-modified: Date: Sat Jul 26 20:10:55 1997
URL: http://w4.lns.cornell.edu/~pvhp/ptk/ptkFAQ.html
Version: 1.00_08

URL (Hypertext-split): http://w4.lns.cornell.edu/~pvhp/ptk/ptkTOC.html
URL (Plaintext): http://w4.lns.cornell.edu/~pvhp/ptk/ptkFAQ.txt
Image-supplement: http://w4.lns.cornell.edu/~pvhp/ptk/ptkIMG.html
ftp-Archive: ftp://ftp.ccd.bnl.gov/pub/ptk/ptkFAQ.txt
ftp-Archive: ftp://rtfm.mit.edu/pub/usenet/perl-faq/ptk-faq/
e-mail-Archive: ptkfaq@pubweb.bnl.gov

Perl/Tk FAQ

ntk->ptk

The Perl/Tk extension to the Perl programming language is copyrighted by its author Nick Ing-Simmons <nik@tiuk.ti.com> whose COPYING file reads as follows:
Copyright (c) 1995-1996 Nick Ing-Simmons. All rights reserved.
This package is free software; you can redistribute it and/or
modify it under the same terms as Perl itself, with the exception
of the files in the pTk sub-directory which have separate terms
derived from those of the orignal Tk4.0 sources and/or Tix.

IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
MODIFICATIONS.

See pTk/license.terms for details of this Tk license, 
and pTk/Tix.license for the Tix license.

This compilation of Frequently Asked Questions & answers (FAQ) is intended to answer several of the first (and largely more basic) questions posted to the comp.lang.perl.tk newsgroup and the ptk mailing list.

This document concerns itself with the Perl/Tk programming language (or, if you prefer, the Tk extension to Perl). Please be aware that this is not the Perl FAQ, this is not the Tcl FAQ, nor is this the Tcl/Tk FAQ. Each of those other documents is a useful source of information for Perl/Tk programmers but they are completely different from this one.

This is a dynamic document and contributions, clarifications, and corrections are most welcome! Please send e-mail to <pvhp@lns62.lns.cornell.edu> or to <pvhp@forte.com>. With your help this document will get better (-:

perl/Tk FAQ

  1. What is perl/Tk?
  2. What is the difference between perl/Tk and Tkperl?
  3. Do I need Tcl/Tk in order to build Perl/Tk?
  4. Where is it?
  5. What/Where is CPAN?
  6. How do I build it?
  7. Where is the Documentation?
  8. How do I write scripts in perl/Tk?
  9. What widget types are available under perl/Tk?
  10. How do I get widget X to do Y ?
    1. How do I get a Button to call a Perl subroutine?
    2. How do I get a Button to actively change under my mouse pointer?
    3. How do I arrange the layout of my widgets?
    4. How do I get a Popup to popup?
    5. How do I bind keyboard keys?
    6. How do I add bindings?
    7. How do I bind the action of a slider (sic) to ... ?
    8. How do I configure a Scrollbar to scroll multiple widgets?
    9. How do I display a bitmap?
    10. How do I display an image?
    11. What Image types are available?
    12. Is there any way to have more than one Listbox contain a selection?
    13. How do I select a range of tags in a Text widget?
    14. How do I group Radiobuttons together?
    15. How do I specify fonts?
    16. How do I get the entry in an Entry?
    17. How do I hide a password Entry?
    18. How do I limit an Entry's insertion width?
    19. How do I obtain Menus that do not tear off?
  11. How do I get a Canvas to ... ?
    1. Display a bitmap?
    2. Erase a display?
    3. Display an Image?
    4. What things can be created on a Canvas?
    5. How do I redraw a line on a Canvas?
    6. How do I use the Canvas as a geometry manager?
    7. How do I get a Canvas to output PostScript(c)?
    8. How do I get a PostScript(c) output of a Canvas w/ widgets?
    9. How do I get the size of a Canvas? After a re-size?
    10. How do I bind different actions to different areas of the same Canvas?
  12. Common Problems.
    1. What do the ->, => and :: symbols mean?
    2. What happened to the ampersands &?
    3. What happened to the quotation marks?
    4. Must I use "my" on all my variables?
    5. Is there a way to find out what is in my perl/Tk "PATH"?
    6. What is the difference between use and require?
    7. How do I change the cursor/color?
    8. How do I ring the bell?
    9. How do I determine the version of perl/Tk that I am running?
    10. How do I call perl from C?
    11. How do I call Tcl code from perl/Tk?
  13. What are some of the primary differences between Tcl/Tk and Perl/Tk?
  14. How do I install new scripts | modules | extensions?
  15. How do I write new modules?
  16. Composite Widgets.
    1. How do I get a Dialog box?
    2. Is there a file selector?
    3. Is there a color editor?
    4. Is there a round Scale?
    5. Is there something equivalent to tkerror?
    6. Are there Tables?
  17. Programming/development tools.
    1. Is there a Tcl/Tk to perl/Tk translator?
    2. Is there something equivalent to wish in perl/Tk?
    3. Is there a debugger specifically for perl/Tk?
    4. Is there a GUI builder in perl/Tk?
  18. Processes & Inter-Process Communication under Perl/Tk.
    1. How does one get Perl/Tk to act on events that are not coming from X?
    2. Is there a send and do I need xauth?
    3. How can I do animations using after?
    4. How do I update widgets while waiting for other processes to complete?
    5. How do you fork on System V (HP)?
  19. How do I "clear the screen"?
  20. Is there a way to have an X application draw inside a perl/Tk window?
  21. Is there a version for Microsoft Windows(tm)?
  22. Are there any international font packages for perl/Tk?
  23. Are there any other ways to create event based interfaces from perl?
  24. Where can I get more information on graphics (modules|scripts)?
  25. Are there any major applications written in perl/Tk?
  26. What is the history of pTk and perl/Tk?
  27. What can we expect the future to hold?
  28. How do I obtain the latest version of this FAQ?
  29. Acknowledgements & maintainer.

Return to table of contents | Next