Any thoughts on how to approach this? The instructions say it is supposed to be easy, and it probably would be, if I already knew how to do it...
Randolph
Any thoughts on how to approach this? The instructions say it is supposed to be easy, and it probably would be, if I already knew how to do it...
Randolph
R Fritz wrote:
Any thoughts on how to approach this? The instructions say it is supposed to be easy, and it probably would be, if I already knew how to do it...
One way to do this is to use the unknown control feature of XRC, and then at runtime you create the glcanvas outside of XRC and attach it to the form using the name you gave the unknown control. XRC will then reparent the glcanvas such that it appears in the form as if it was created there in the first place.
Otherwise you can create a plugin for XRCed that will enable it to be used directly without using the unknown control feature.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
The unknown control feature seems to get entangled with the two-stage create. wx.glcanvas.GLCanvas() requires a parent window, which in my case would be the frame, and AttachUnknownControl() seems to only work before the frame actually exists. The example in the Wiki appears to be several years out of date, so it's not really very helpful. For the moment, I have fallen back on a Python-created frame, and this is actually all right for me, but it would be useful to know how to use XML resources.
Randolph
On Dec 17, 2008, at 8:12 PM, Robin Dunn wrote:
R Fritz wrote:
Any thoughts on how to approach this? The instructions say it is supposed to be easy, and it probably would be, if I already knew how to do it...
One way to do this is to use the unknown control feature of XRC, and then at runtime you create the glcanvas outside of XRC and attach it to the form using the name you gave the unknown control. XRC will then reparent the glcanvas such that it appears in the form as if it was created there in the first place.
Otherwise you can create a plugin for XRCed that will enable it to be used directly without using the unknown control feature.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
R Fritz wrote:
The unknown control feature seems to get entangled with the two-stage create. wx.glcanvas.GLCanvas() requires a parent window, which in my case would be the frame, and AttachUnknownControl() seems to only work before the frame actually exists.
No, it should work after the frame has been created. How are you using it?
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!