Re: wxPython
jean-michel bain-cornu a écrit :
> Une astuce supplémentaire (c'est mon jour de bonté) : tu peux changer
> les textes des boutons standards avec le code suivant :
> def OnWizPageChanged(self, evt):
> texts= ('&Next >','&Cancel','< &Back','&Finish')
> for o in self.wizard.GetChildren():
> if 'Button' in str(type(o)):
> text= o.GetLabel()
> if text in texts:
> o.SetLabel('nouveau label...')
Je trouve plus joli de l'écrire ainsi:
def OnWizPageChanged(self, evt):
self.wizard.FindWindow(wx.ID_FORWARD ).SetLabel('En avant!')
self.wizard.FindWindow(wx.ID_BACKWARD).SetLabel('E n arrière!')
self.wizard.FindWindow(wx.ID_CANCEL ).SetLabel('Quitter')
--
Amaury
|