Help on dragging objects in Chaco...

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Help on dragging objects in Chaco...

Christophe Grimault
Hello,

I started with the polygon_move example to add dragging features to my
own app. I've been struggling with the way it is done and I'm still not
able to understand everything ... Anyway, I added what I wanted, which
is to drag rectangles, to move being only on the x (index) axis.

Now, I would like to know which plot, or array data nane, or ... was
dragged when releasing the mouse button, so I can propagte the change in
my model ! How can I do that.

For example, in the polygon move example, how do I get the number of
sides of the polygon that was moved ?

Any help would be very appreciated !

Regards

Chris


--
Christophe Grimault
NovaGrid SAS
Les jardins de la Teillais
3, allée de la grande égalonne
35740 Pacé
France

tel : (33)2 23 41 37 97
web : www.novagrid.com

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Help on dragging objects in Chaco...

Peter Wang-2
Hi Christopher,  I am attaching an example that shows how to do this.
Look for all the comments that start with two pound signs "##", or
just diff it against the current version in trunk.

-Peter

On Tue, Apr 2, 2013 at 12:02 PM, Christophe Grimault
<[hidden email]> wrote:

> Hello,
>
> I started with the polygon_move example to add dragging features to my
> own app. I've been struggling with the way it is done and I'm still not
> able to understand everything ... Anyway, I added what I wanted, which
> is to drag rectangles, to move being only on the x (index) axis.
>
> Now, I would like to know which plot, or array data nane, or ... was
> dragged when releasing the mouse button, so I can propagte the change in
> my model ! How can I do that.
>
> For example, in the polygon move example, how do I get the number of
> sides of the polygon that was moved ?
>
> Any help would be very appreciated !
>
> Regards
>
> Chris
>
>
> --
> Christophe Grimault
> NovaGrid SAS
> Les jardins de la Teillais
> 3, allée de la grande égalonne
> 35740 Pacé
> France
>
> tel : (33)2 23 41 37 97
> web : www.novagrid.com
>
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev

polygon_move.py (5K) Download Attachment