Re-labelling wx.wizard buttons

Hi,

I have a multi-page wx.Wizard using wxPython 2.8.9.2. I'm trying to
change the 'Next >' label on one page to a custom value - let's say
'Checkout >' for teh sake or argument.

The only way I can think of doing this seems a bit hacky:

self.nextBtn = self.wizard.FindWindowByLabel( '&Next >' )
                    self.nextBtn.SetLabel( '&Commit >' )

Ug premature post. What I wanted to say was can anyone think of
anything smarter than this:

self.nextBtn = self.wizard.FindWindowByLabel( '&Next >' )
self.nextBtn.SetLabel( '&Checkout >' )

Regards.

Maybe only a little smarter, but I would use FindWindowById(wx.ID_FORWARD)

···

On 1/26/11 8:51 PM, poogie wrote:

Ug premature post. What I wanted to say was can anyone think of
anything smarter than this:

self.nextBtn = self.wizard.FindWindowByLabel( '&Next>' )
self.nextBtn.SetLabel( '&Checkout>' )

--
Robin Dunn
Software Craftsman

Hello,
your solution is working fine for Back and Cancel button but for Next or Finish button ce label, even if it seems modified, always display Next

Hello, I made the test again with version 4.2.5 of wxPython, the behavior is still the same. Event if the Next button label seems to be modified by setlabel function the label displayed is always Next (or Finish for the last panel). For Previous and Cancel buttons all is working fine. Any idea on what is going wrong? Thanks