Discussion: wxPython
Afficher un message
Vieux 17/10/2007, 06h29   #6
jean-michel bain-cornu
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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...
  Réponse avec citation
 
Page generated in 0,06351 seconds with 9 queries