Avevo frainteso, comunque da CreateButtonSizer no, però se proprio non vuoi crearti il layout del dialog da solo potresti provare a modificare il label dopo aver creato il dialog. Qualcosa del genere (non testato) potrebbe funzionare:
stdDialog=self.CreateButtonSizer(wx.OK|wx.CANCEL) btn=stdDialog.FindWindowById(wx.CANCEL) btn.SetLabel("Annulla") s.Add(stdDialog, 0, wx.ALL|wx.EXPAND, 5) Ciao Il giorno 06 aprile 2013 15:44, Adriano Barbieri <adrianob...@yahoo.it> ha scritto: > ** > Ciao Giuseppe, > Quindi non è possibile farlo da CreateButtonSizer()! > Ok, grazie anche per la doc :) > Adriano > > ----- Original Message ----- > *From:* Giuseppe Amato <giuam...@gmail.com> > *To:* Discussioni generali sul linguaggio Python <python@lists.python.it> > *Sent:* Saturday, April 06, 2013 9:35 AM > *Subject:* Re: [Python] CreateButtonSizer e label > > Puoi usare > btn=wx.Button(self, wx.ID_CANCEL, label="Annulla") > > La doc: > http://docs.wxwidgets.org/2.8/wx_wxbutton.html > > Puoi anche usare un constructor tipo wxGlade > > > Il giorno 06 aprile 2013 09:30, Adriano Barbieri <adrianob...@yahoo.it>ha > scritto: > >> Buongiorno a tutti. >> Creando un dialogo: >> ... >> ... >> ... >> Arrivando ad esempio: >> s.Add(self.CreateButtonSizer(**wx.OK|wx.CANCEL), 0, wx.ALL|wx.EXPAND, 5) >> >> Come posso cambiare l'etichetta del bottone "Cancel" in "Annulla"? >> >> Potrei inserire i bottoni nel sizer così: >> btn = wx.Button(self, wx.ID_OK) >> btn.SetDefault() >> s.btnsizer.AddButton(btn) >> btn = wx.Button(self, wx.ID_CANCEL) >> btn.SetLabel("Annulla") >> s.btnsizer.AddButton(btn) >> >> singolarmente e così settare l'etichetta del bottone in causa, ma se c'è >> il modo di farlo in un colpo solo sarebbe meglio. >> >> Grazie a chi vorrà illuminarmi :) >> Adriano >> >> >> ______________________________**_________________ >> Python mailing list >> Python@lists.python.it >> http://lists.python.it/**mailman/listinfo/python<http://lists.python.it/mailman/listinfo/python> >> > > > > -- > ____________________________ > Giuseppe Amato > e-mail: giuam...@gmail.com > > ------------------------------ > > _______________________________________________ > Python mailing list > Python@lists.python.it > http://lists.python.it/mailman/listinfo/python > > > _______________________________________________ > Python mailing list > Python@lists.python.it > http://lists.python.it/mailman/listinfo/python > > -- ____________________________ Giuseppe Amato e-mail: giuam...@gmail.com
_______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python