harryo / zipworld.com.au (Harry Ohlsen) wrote:
>I have a canvas displayed and would like to add some text to it on the
>fly (ie, based upon the user doing something).
>
>Can I create a new Label widget and have it placed at a specified (x,
>y) position within the canvas?
>
>I need to create an arbitrary number of these ... and move them around
>the canvas after they've been created.
>
>If a Label isn't the right thing, can someone tell me what is?
>
>A pointer to some sample code would be fantastic.

Back to my O'Reilly Perl/Tk book. Apparently a 
canvas widget can contain various "items", such 
as polygon or text. There is a "createText" 
method of a canvas (perhaps createitem or 
create_item in ruby/Tk), that takes coordinates, 
and the text. In perl, it's:
  "$id = $canvas->createText(0,0, -text => 
"origin");
Various other options (besides text) are 
supported, including anchor, fill, font, etc.

Kevin