Am 07.12.2008, 21:50 Uhr, schrieb Marcos Duarte <[EMAIL PROTECTED]>:

> Two other questions:
> I am playing with FC2 to change the object the mouse is over it.
> It works but the response of the mouse to other events are affected
> (It is more difficult to delete the object with right button).
> If you could try the attached code (change the image on line 23), you
> see that you can add points with the left button and delete them with
> the right button (its is just a continuation of you have helped me).
> Now, if you uncomment lines 57-68, you will see that is tougher to
> delete the point and I don't know how to solve that.

Hmm, I didn't really notice the problem. But here's on reason why it might  
get harder to delete objects: If you insert the "select" circle in front  
of your current object the "select" circle will now receive the mouse  
events. So you should probably insert the select circle just behind the  
point, by doing something like

self.select = self.canvas.create('Circle', 14, pos=self.point, name =  
'sel', look=look, where = nodes[0].parent.children.index( nodes[0] ) )

Or you bind the rightDown event to delete an object to the select circle  
as well. Or you modify the gui mode code.

> Another question: when I use the move-object gui button, I would like
> to still be able to show at the status bar which object the mouse
> cursor is over it. In the way I wrote, at the moment I use the gui
> buttons, what I run inside the class canvas stops to run. I tried to
> implement the mouse response in the class frame by accessing the
> canvas.hitTest form outside but it does not work. Any suggestion?

Yup, bind to raw_input.move instead of input.move.

-Matthias

Btw, to get the nodes in the move event, you can do this:

def OnMove(self, evt):
     nodes = evt.nodes

instead of your old code.
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to