Hi,
I don't know if this can help. I needed a control similar to a text control so I defined my own text control that inherits form wx.TextCtrl and another object.
Then I wrote a class
class MyTextCtrlXmlHandler(xrc.XmlResourceHandler)
and the methods
def __init__(self):
def CanHandle(self, node):
def DoCreateResource(self):
as explained in the wx help file.
In the xrc file I created by hand an entry like this:
<object class="MyTextCtrl" name="Text">
..
</object>
The downside is that when in XRCed I try to show the control I get an exception. A part of this, I can work on my xrc file with XRCed on other controls.
I read that it's also possible to create an Unknown control with XRCed and than assign a class but I dodn't understand how to do it.
Is it possible to use some of the other wxWidgets than the basic ones
present in XRCed?
Best regards,
Frank
Hi,
I don't know if this can help. I needed a control similar to a text control so I defined my own text control that inherits form wx.TextCtrl and another object.
Then I wrote a class
class MyTextCtrlXmlHandler(xrc.XmlResourceHandler)
and the methods
def __init__(self):
def CanHandle(self, node):
def DoCreateResource(self):
as explained in the wx help file.
In the xrc file I created by hand an entry like this:
<object class="MyTextCtrl" name="Text">
..
</object>
The downside is that when in XRCed I try to show the control I get an exception. A part of this, I can work on my xrc file with XRCed on other controls.
I read that it's also possible to create an Unknown control with XRCed and than assign a class but I dodn't understand how to do it.
XRCed is in the process of getting some new functionality to allow it to be able to use new standard widgets easily, and also be able to use your own custom widgets too in the same manner. This was a project sponsored by the Google Summer of Code. It probably won't be in the next release of wxPython, but likely will be in the one after that. More details are here: XRCed Refactoring Project - wxPyWiki
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!