Єгор Пасацький

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()

{ "author_name": "Єгор Пасацький", "author_type": "self", "tags": [], "comments": 0, "likes": 0, "favorites": 0, "is_advertisement": false, "subsite_label": "unknown", "id": 202372, "is_wide": true, "is_ugc": true, "date": "Fri, 29 Jan 2021 15:13:59 +0300", "is_special": false }
0
0 комментариев
Популярные
По порядку

Комментарии

null