Re: wxPython
Bonjour,
>> 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')
>
Effectivement, et de beaucoup. Il y avait eu un échange à ce sujet sur
la ml wxpython, mais je n'avais pas corrigé dans mon script...
|