Problème code python

mael248 - Modifié le 12 sept. 2022 à 23:35
 mael248 - 13 sept. 2022 à 18:01

bonjours j ai se code mais je ne sais pas comment recuperer les donner que l utilisateur entre dans le widget entry pouvez vous maider svp 

 
from tkinter import *

root = Tk()
root.title("mael")
root.geometry("720x480")
root.config(background='#1FBAE7')

frame = Frame(root, bg='#1FBAE7')

width = 300
height = 300
image = PhotoImage(file="password (1).png").zoom(15).subsample(32)
canvas = Canvas(frame, width=width, height=height, bg='#1FBAE7', bd=0, highlightthickness=0)
canvas.create_image(width/2, height/2,image=image)
canvas.grid(row=0, column=0, sticky=W)

right_frame = Frame(frame, bg='#1FBAE7')




label_title = Label(right_frame, text="mots de pass", font=("Helvertica", 20), bg='#1FBAE7', fg='white')
label_title.pack()
password = Entry(right_frame, font=("Helvertica", 20), bg='#1FBAE7', fg='white')
password.pack()
right_frame.grid(row=0, column=1, sticky=W)
frame.pack(expand=YES)
boutton = Button(right_frame, text="mots de pass", font=("Helvertica", 20), bg='#1FBAE7', fg='white')
boutton.pack(fill=X)
root.mainloop()

1 réponse

jpmaton Messages postés 67 Date d'inscription mardi 17 mai 2005 Statut Membre Dernière intervention 26 septembre 2023 3
13 sept. 2022 à 16:15

Bonjour,

Mets le MP d'Entry dans une variable contrôle et fais-la s'afficher par une instruction 'command' du bouton.

Pour info https://www.youtube.com/watch?v=lUDF9bureH4 de Jason Champagne est très instructif.

Bien à toi,


0

merci

0
Rejoignez-nous