[wxPython] OGL wxShapeCanvas - how to overriding methods

Hi,

Does anyone know if it's possible to override wxShapeCanvas methods, such as
::OnEndDragLeft?

I've tried inheriting wxShapeCanvas and wxPyShapeCanvas but I'm not seeing the
events. Do I have to EVT_* and if so, which ones.

Cheers

Lee

···

--
wxPython

Does anyone know if it's possible to override wxShapeCanvas methods, such

as

::OnEndDragLeft?

I've tried inheriting wxShapeCanvas and wxPyShapeCanvas but I'm not seeing

the

events. Do I have to EVT_* and if so, which ones.

Adding this to TestWindow in the demo works:

    def OnBeginDragLeft(self, x, y, keys):
        self.log.write("OnBeginDragLeft: %s, %s, %s\n" % (x, y, keys))

    def OnEndDragLeft(self, x, y, keys):
        self.log.write("OnEndDragLeft: %s, %s, %s\n" % (x, y, keys))

I only get the callbacks if the drag is on the canvas, not one of the
shapes.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

"Robin Dunn" <robin@alldunn.com> writes:

Adding this to TestWindow in the demo works:

    def OnBeginDragLeft(self, x, y, keys):
        self.log.write("OnBeginDragLeft: %s, %s, %s\n" % (x, y, keys))

    def OnEndDragLeft(self, x, y, keys):
        self.log.write("OnEndDragLeft: %s, %s, %s\n" % (x, y, keys))

I only get the callbacks if the drag is on the canvas, not one of the
shapes.

Ahhh, nuts. I was hoping the canvas would see the shape drag to avoid some
circular refs between canvas and shape evt handler - have to rethink that.

Cheers, Robin.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

--
wxPython