wxpython + ogl

Andrzej za at konto.pl
Tue Aug 30 16:24:55 EDT 2005


Hi!

I'm writing a simple digital circuit simulator in order to familirise with 
(wx)python. I thought it would be an easy task with help from ogl lib. After 
a not so brief encounter with wx specs I've started to code but I just can't 
figure out how to get user-defined attachment points to work. I've tried to 
call SetAttachmentMode(True) for shapes that should be connected and then:

dc = wx.ClientDC(self.canvas)  # ->self.canvas = ogl.ShapeCanvas(self)
self.canvas.PrepareDC(dc)
shape1.MoveLineToNewAttachment(dc, line, x1, y1)

But the line pops up in random place and is changing it's position only 
vertically when moving one of the shapes. I'm probably doing something 
terribly wrong and I'd appreciate any help to solve my little problem . 
Thanks in advance

Andrzej





More information about the Python-list mailing list