{"id":14284,"url":"\/distributions\/14284\/click?bit=1&hash=82a231c769d1e10ea56c30ae286f090fbb4a445600cfa9e05037db7a74b1dda9","title":"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0444\u0438\u043d\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u0430\u043d\u0446\u044b \u0441 \u0441\u043e\u0431\u0430\u043a\u0430\u043c\u0438","buttonText":"","imageUuid":""}

from tkinter import *

root=Tk() root.geometry('400x400')

def btn1(): label2 = Label(text = "Hello "+ ent.get()+'!') label2.place(x=150, y=150) canvas.create_image(100, 0, anchor = NW, image = fl_img)

button1 = Button(text = "Hello", command = btn1) button1.place(x=75,y=75, width=100, height=50)

button2 = Button(text = "Exit", command = root.destroy) button2.place(x=225,y=75, width=100, height=50)

ent = Entry(bd=1) ent.place(x=225,y=25, width=100, height=30)

label1 = Label(text = "Enter your name:") label1.place(x=75, y=25, width=100, height=30)

canvas = Canvas(width = 500, height = 500) canvas.place(x=0, y=200) fl_img = PhotoImage(file = "flowers.png")

root.mainloop()

0
Комментарии
-3 комментариев
Раскрывать всегда