Canvas and Items 
Author Message
 Canvas and Items

I want to know on which item of my canvas I click on.
There is 4 images in the canvas, loaded with Photo.

For the moment my solution is to get the mouse coordinates,
and to determine if the item I clicked on is a image.

Could I associate data to an item so when I click on it
I can get this data to determine which image it is.

Thanks

-Manu



Tue, 23 Jul 2002 03:00:00 GMT  
 Canvas and Items

Quote:

> I want to know on which item of my canvas I click on.
> There is 4 images in the canvas, loaded with Photo.

> For the moment my solution is to get the mouse coordinates,
> and to determine if the item I clicked on is a image.

> Could I associate data to an item so when I click on it
> I can get this data to determine which image it is.

Look at the Canvas examples in the widget demo program, they do all
sorts of neat bindings to different types of Canvas items.  See man
widget.
Quote:

> Thanks

> -Manu



Tue, 23 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Moving canvas window items

2. Getting substring from Canvas text item

3. Strange Canvas Rectangle Item Bind Behavior

4. Q:Put canvas text item in a rectangular area

5. Canvas text item font size.

6. -capstyle option for canvas lines items broken on Win95.

7. how to delete items from a canvas widget?

8. Squezing items onto a Canvas without scrollbars

9. raising/lowering Canvas items

10. "Hiding" items on a canvas

11. Canvas item tagging

12. detect overlapping items in a canvas?

 

 
Powered by phpBB® Forum Software