Как мне добавить текст сбоку цетов? from tkinter import *
def red():
label.config(text='Red')
entry.delete(0, END)
entry.insert(0, '#ff0000')
def orange():
label.config(text='Orange')
entry.delete(0, END)
entry.insert(0, '#ff7d00')
def yellow():
label.config(text='Yellow')
entry.delete(0, END)
entry.insert(0, '#00')
def blue():
label.config(text='Blue')
entry.delete(0, END)
entry.insert(0, '#343aeb')

root = Tk()
root.title('Colors')
root.geometry('1920x1080')

label = Label(root, text='Colors', justify='center', anchor='c')
label.pack()

entry = Entry(root, justify='center', bd=5, bg='#f2f2f2')
entry.pack()

button1 = Button(width=100, bg='red', command=red)
button1.pack()

button2 = Button(width=100, bg='orange', command=orange)
button2.pack()

button3 = Button(width=100, bg='yellow', command=yellow)
button3.pack()

button4 = Button(width=100, bg='blue', command=blue)
button4.pack()

root.mainloop()

arishkaz arishkaz    2   07.09.2021 20:49    1

Другие вопросы по теме Информатика