Hi,
I am trying to create an enhanced GLCanvas where you can create custom shapes, auto picking, zoom, pan and etc. The first attempt is here and it’s working fine at this stage. Right now you have only ‘Rectangle’ object to draw.
I would like to add wxPython events to these custom object that can be drawn on canvas. Earlier I was thinking to add run time methods to instances but it’s
ugly and I am not sure if wxPython events can help me out here. If “yes” then I would like to have a guide line for implementation.
1.Mouse wheel (zoom in-out)
2.Middle Drag (pan)
3. Left Down (pick)
Prashant
Demo.py (1.42 KB)
MagicCanvas.py (11.6 KB)
···
Connect with friends all over the world. Get Yahoo! India Messenger.
Hello,
I've just tried your demo with Python 2.5.2 and wxPython 2.8.6.1/2.8.8.1 but I get an error. With winpdb, I saw that while initializing the rectangle, all variables (__xxx) are not created and instead variables are created with the name _Rectangle__xx...
I really do not know where this comes from.
If you have any idea, while I'm trying to find out what happens.
Regards,
Mathias
Prashant Saxena wrote:
···
Hi,
I am trying to create an enhanced GLCanvas where you can create custom shapes, auto picking, zoom, pan and etc. The first attempt is here and it's working fine at this stage. Right now you have only 'Rectangle' object to draw.
I would like to add wxPython events to these custom object that can be drawn on canvas. Earlier I was thinking to add run time methods to instances but it's
ugly and I am not sure if wxPython events can help me out here. If "yes" then I would like to have a guide line for implementation.
1.Mouse wheel (zoom in-out)
2.Middle Drag (pan)
3. Left Down (pick)
Prashant
------------------------------------------------------------------------
Connect with friends all over the world. Get Yahoo! India Messenger. <http://in.rd.yahoo.com/tagline_messenger_1/*http://in.messenger.yahoo.com/?wm=n/>
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Hum, it is a simple name mangling for "private" variables. But I still do not why self.__color cannot be called from self.__createDisplayList().
Mathias
Mathias Lorente wrote:
···
Hello,
I've just tried your demo with Python 2.5.2 and wxPython 2.8.6.1/2.8.8.1 but I get an error. With winpdb, I saw that while initializing the rectangle, all variables (__xxx) are not created and instead variables are created with the name _Rectangle__xx...
I really do not know where this comes from.
If you have any idea, while I'm trying to find out what happens.
Regards,
Mathias
Prashant Saxena wrote:
Hi,
I am trying to create an enhanced GLCanvas where you can create custom shapes, auto picking, zoom, pan and etc. The first attempt is here and it's working fine at this stage. Right now you have only 'Rectangle' object to draw.
I would like to add wxPython events to these custom object that can be drawn on canvas. Earlier I was thinking to add run time methods to instances but it's
ugly and I am not sure if wxPython events can help me out here. If "yes" then I would like to have a guide line for implementation.
1.Mouse wheel (zoom in-out)
2.Middle Drag (pan)
3. Left Down (pick)
Prashant