wxWIZARD_EX_HELPBUTTON?

I can't seem to get the helpbutton on the wizard working correctly. I
can't do a two step build process such as this:

self.wizID = wx.wxNewId()
self.configWizard = wiz.wxWizard(self, self.wizID)
self.configWizard.SetExtraStyle(wiz.wxWIZARD_EX_HELPBUTTON)
self.configWizard.Create(self, self.wizID, "guiCHILD
       Configuration Wizard",\
                         images.getWizTest1Bitmap())

because I get an AddChild() added twice exception (both using wizID
and -1 for the id)

Now, if I do it thus:

self.configWizard = wiz.wxWizard(self, self.wizID,"guiCHILD
         Configuration Wizard",\
                                 images.getWizTest1Bitmap())
self.configWizard.SetExtraStyle(wiz.wxWIZARD_EX_HELPBUTTON)

I get the help button, but an interesting problem arises. Pressing the
next or previous buttons suddenly does not call OnWizardPageChanging
(or OnWizardPageChanged for that matter). Again, merely commenting out
the SetExtraStyle line works to correct the problem.

I've troubleshot a bit, and it seems like with the SetExtraStyle
method called, no events get registered. Somehow, the pages change,
cancel or finish, but the wxEVT_WIZARD_xxx events don't get
generated.

Do I need to separately attach an event generator after calling
SetExtraStyle? Is this a bug, or something I'm missing? Thanks.

Cheers,
-JW

···

--
JW Pennington | john.pennington@science.oregonstate.edu
Geosciences, Oregon State Univ., Wilkinson 017, Corvallis Or. 97331
    
    "It's hard to take life too seriously
        when you realize yours is a joke." -original

JW Pennington wrote:

I can't seem to get the helpbutton on the wizard working correctly. I
can't do a two step build process such as this:

self.wizID = wx.wxNewId()
self.configWizard = wiz.wxWizard(self, self.wizID)
self.configWizard.SetExtraStyle(wiz.wxWIZARD_EX_HELPBUTTON)
self.configWizard.Create(self, self.wizID, "guiCHILD
       Configuration Wizard",\
                         images.getWizTest1Bitmap())

because I get an AddChild() added twice exception (both using wizID
and -1 for the id)

The way to do two-step creation in wxPython is to use the "Pre" version of the window constructor. For example:

  self.configWizard = wiz.wxPreWizard(self, self.wizID)
  self.configWizard.SetExtraStyle(wiz.wxWIZARD_EX_HELPBUTTON)
  self.configWizard.Create(self, self.wizID,
                                  "guiCHILD Configuration Wizard",
                                  images.getWizTest1Bitmap())

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!