'current' tag .....

pehr anderson pehr at pehr.net
Thu Oct 5 08:52:21 EDT 2000


Dear Martin,

It sounds like you just want to capture the "button-down" "button-up"
events and track that separately. In you code where you notice that the
mouse is over your item you can test on each tiny mouse movement 
whether you are in the button-down state.

Alternatively, you could only enable tracking of movements whent
the button is down, and disable tracking of movement after a 
release event.  I'm not sure how to hook and unhook the mouse-movement
event capture but that sounds like the "right" way to do it.
Very low computational consumption when the user jiggles the mouse
without clicking the button.

	-pehr



Martin Franklin wrote:
> 
> Hi,
> 
> Hopfully a quick question!?!
> 
> I have a few items on a (tkinter) canvas and I want to change their
> apearance
> when the mouse is moved over them AND button 1 is pressed...  My problem
> is that I want to use the 'current' tag to decide which item to change
> and this 'current' tag is not updated when I have B1 down.  If I just
> use
> <Motion> all is well as 'current' is updated.
> 
> quick fix anyone?
> 
> Thanks
> Martin




More information about the Python-list mailing list