Perl/Tk saves your favorite tools

Main
back: Tk layout -place
next: Tk callbacks ;4

One of the most important widgets is the Canvas, which is used to draw on just like the canvas of a painting.

The canvas is a complex widget with its own rules. For instance, the items on the canvas have to be created with $canvas->create() and later modified with $canvas->itemconfigure. By the way:

   $canvas->createLine(...)
is equivalent to
   $canvas->create('line', ...);

Actions on canvas items are not via the common configure interface, because they are no objects: the canvas stores the information of items internally. For items, you have to use $canvas->itemconfigure.

Furthermore, there are complex canvas functions like move. Those functions work on single items or on groups of items which share the same tag.

 
Tk layout -place Tk callbacks ;4

Created by Mark Overmeer with PPresenter on 22 May 2000.