Migrating from 2.x: XRC/Dialog via Resources?

10 views
Skip to first unread message

Yuri D'Elia

unread,
Dec 1, 2021, 3:42:03 PM12/1/21
to wxpytho...@googlegroups.com
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..?

Reply all
Reply to author
Forward
0 new messages