Migrating from 2.x: XRC/Dialog via Resources?
Yuri D'Elia <[email protected]> Wed, 01 Dec 2021 19:24:40 +0100
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
Hi everyone,
I'm migrating a codebase from wxPython 2.x, where I made use of
xrced/resources.
I'm attempting to create a Dialog directly from a resource as it was
originally described on the wiki
(https://wiki.wxpython.org/UsingXmlResources), essentially:
class Dialog(wx.Dialog):
def __init__(self, parent, resource):
w = resource.LoadDialog(parent, "Test")
self.PostCreate(w)
PostCreate is now deprecated. I assume I _could_ use just Create() now?
However, attempting to load the resources just creates an empty
frame/dialog in my case. No controls shown. xrc.XRCCTRL doesn't find the
ids of the controls as described in the resource as well, so it makes
sense that the original resource files didn't load properly.
Are resources still supported in general? XRCed seems to be gone from
the codebase. wxGlade doesn't seem to be able to export xrc resource
files.
Pointers..?
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/87pmqguqs7.fsf%40wavexx.thregr.org.