Q:python control of gnome-canvas

nick nickb at earth.ox.ac.uk
Mon Feb 5 19:06:59 CET 2001


I would be very grateful for any assistance here.

Q/ How do I get a  CanvasItem position information to update when I move
it?
I can move things but their position info seems to remain unchanged!

I can't find the answer to this particular problem though there is a lot
of info out there....

Setting up some test routines on a gnome-canvas
when moving widgets using event drivers and the mouse.

For a rectangle I have ...

the original location-
    ('rect',x1=x1,y1=y1....etc
and can see the location info by -
    widget['x1'] etc

and using an event driver to do-
    widget.move(x,y)

but widget['x1'] etc are not updated and only hold the original widget
coordinates.

I can only get the coordinates to update using
    widget.set(x1=newx1,x2=newx2...etc

I presume I am missing something.
It gets worse if I try and group things since it is rather
troublesome to have to explicitly set  multiple grouped widgets.

So - how do I get the position information to update when a widget
moves?

thanks if you can spare the time
Nick/Oxford








More information about the Python-list mailing list