+#---------------------------------------------------------------------------
+
+class TestDialog(wxDialog):
+    def __init__(self, parent, ID, title,
+                 pos=wxDefaultPosition, size=wxDefaultSize,
+                 style=wxDEFAULT_DIALOG_STYLE):
+
+        # Instead of calling wxDialog.__init__ we precreate the dialog
+        # so we can set an extra style that must be set before
+        # creation, and then we create the GUI dialog using the Create
+        # method.
+        pre = wxPreDialog()
+        pre.SetExtraStyle(wxDIALOG_EX_CONTEXTHELP)
+        pre.Create(parent, ID, title, pos, size, style)
+
+        # This next step is the most important, it turns this Python
+        # object into the real wrapper of the dialog (instead of pre)
+        # as far as the wxPython extension is concerned.
+        self.this = pre.this
+
+
+        # Now continue with the normal construction of the dialog
+        # contents
+        sizer = wxBoxSizer(wxVERTICAL)
+
+        label = wxStaticText(self, -1, "This is a wxDialog")
+        label.SetHelpText("This is the help text for the label")
+        sizer.Add(label, 0, wxALIGN_CENTRE|wxALL, 5)
+
+        box = wxBoxSizer(wxHORIZONTAL)
+
+        label = wxStaticText(self, -1, "Field #1:")
+        label.SetHelpText("This is the help text for the label")
+        box.Add(label, 0, wxALIGN_CENTRE|wxALL, 5)