next up previous contents
Next: Windows Up: The Canvas Widget Previous: Canvas Items

Canvas Tags

A canvas tag is a convenient way to refer to canvas items. A canvas tag is an instance of the class CanvasItem (but setting e.g. its filling colour will of course have no effect). Canvas tags are in particular useful because you can not only add canvas items explicitly to the tag, but also by the so-called search specification, so you can select the canvas item closest to a given canvas location etc.

For more on canvasses, see the examples under htk/examples/canvas. For example, MainxmasCanvas.hs (screenshot Fig. 5) shows a variety of canvas items, and how to set up a cheap and cheerful drag-and-drop.



Christoph Lueth
Wed May 29 13:20:38 MEST 2002