Passage d'un canevas en paramètre
Bonjour à tous,
j'aurais voulu savoir, est-il possible de passer un canevas en paramètre d'une fonction ?
Voici un petit bout de mon programme qui, bizarrement ne fonctionne pas:
[QUOTE]
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| # -*- coding: cp1252 -*-
import fondecran
import Tkinter
def init():
"""
"""
global fond,plateau
plateau=Tkinter.Tk()
plateau.geometry('1000x800') #Définition des dimensions de la fenetre
fond =Tkinter.Canvas(plateau, width=1000, height=600,background='black')
fondecran.afficherfondecran(fond)
plateau.mainloop() |
ma fonction afficherfondecran:
Code:
1 2 3 4 5 6 7 8 9
| def afficherfondecran(fond):
"""
"""
print ChoixFondEcran(LectureFichierFondEcran('entree.txt'))
a,b,c=dimensionsfondecran(ChoixFondEcran(LectureFichierFondEcran('entree.txt')))
fond.create_image(b/2,c/2,image=a)
fond.place(relx=0,rely=0)
return |
ma fonction de dimensionnement marche mais impossible de visualiser l'image... des idées ?
EDIT:Excusez-moi pour les balises, je n'avais pas compris comment cela marchait :oops: