mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 11:30:06 +01:00
Fix code snippet in docs for XmlReseource.LoadDialog
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
# Without a class
|
||||
dlg = wx.Dialog()
|
||||
wx.xml.XmlResource.Get().LoadDialog(dlg, mainFrame, "my_dialog")
|
||||
dlg.ShowModal()
|
||||
|
||||
dlg = wx.xml.XmlResource.Get().LoadDialog(mainFrame, "my_dialog")
|
||||
dlg.ShowModal()
|
||||
# Or, as a class
|
||||
class MyDialog(wx.Dialog):
|
||||
def __init__(self, parent):
|
||||
super().__init__()
|
||||
wx.xml.XmlResource.Get().LoadDialog(self, parent, "my_dialog")
|
||||
|
||||
Reference in New Issue
Block a user