Skip to Main Content
Learning Perl/Tk
book

Learning Perl/Tk

by Nancy Walsh
January 1999
Beginner content levelBeginner
373 pages
9h 43m
English
O'Reilly Media, Inc.
Content preview from Learning Perl/Tk

Chapter 9. The Canvas Widget

The canvas widget is mainly used for drawing items such as arcs, lines, rectangles, circles, and so on. You can also place text and other widgets inside a canvas widget. Think of it as a painter's canvas: It is blank until you decide to draw something on it. But unlike a painter's canvas, which is limited in size, this canvas is scrollable in any direction. Here are some examples of how you can use a canvas widget:

  • Create a drawing program.

  • Display a graph based on input from the user.

  • Create a customized slider.

Each item you create in a canvas widget can have bindings attached to it to allow for easy interaction with the user.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Perl/Tk

Mastering Perl/Tk

Stephen Lidie, Nancy Walsh

Publisher Resources

ISBN: 1565923146Supplemental ContentCatalog PageErrata