I use Tkinter, and I wanted to print a more sophisticated text on a button. It consists of strings parts, variables that contain e.a 'MyString', and integer Variables.
What it does when i grid the buttons, is following :
Here is the code for my first button :
bouttons_annuler[(mon_compteur_annulations_loc)].config(text = ("Vend", action_corr_numero_ventes_loc, "x", vente_suivie_loc,"a", entry_prix_loc, euros.get(), "\n","Annuler"))
and for my second button :
bouttons_annuler[(mon_compteur_annulations_loc)].config(text = ("Offre achat", action_corr_numero_achats_loc, "x", achat_suivie_loc, "Annuler"))
Where action_corr_numero_ventes_loc represents 'Facebook' ; vente_suivie_loc represents 20 (as an integer) ; entry_prix_loc represents also 20 (as an integer) ; euros.get() represents euros=StringVar(master=root)
euros.set('€ :')
Why does this happen, and how can i solve this? i tried to apply the str() function to all of it, but it didn't work (wouldn't really have made sense if it worked)
format()is your friend