Hi all.
Using the new MovingElements.py written by Chris in a previous mail i
draw a map with draggable bitmaps and draggable text
For bitmaps i use this lines:
self.shape=MovingBitmap (self.bmp, self.point, Height = 3.5, Position = "bc")
self.Canvas.AddObject(self.shape)
self.shape.Bind(FC.EVT_FC_LEFT_DOWN, parent.ObjectHit)
And for the text i use:
self.text = MovingText (testo, self.textPoint, Size = 1, Position = "tc")
self.Canvas.AddObject(self.text)
self.text.Bind(FC.EVT_FC_LEFT_DOWN, parent.ObjectHit)
I wrote MovingText class like MovingBitmaps and like all MovingElements...
class MovingText(FC.ScaledText, MovingObjectMixin, ConnectorObjectMixin):
pass
So i have a bitmap and a text. I can drag and move these on the
canvas, and this works perfectly.
Now i have a problem...
How can i "link" the drag&move of the elements?
Explaining, i have the bitmap in a Point, like (x,y).
The text is under the bitmap, self.textPoint=(x,y-1).
I would that moving the bitmap, also the text could move itself, going
under the bitmap.
How can i do this? Is possible?
Please ask if you don't have understand from my bad english.
--
Marco Meoni (Sbaush)
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas