Sunday, 23 January 2022

Write Python GUI program to create the background with changing colors

Slip 4 Q 1

CODE :



from tkinter import Button, Entry, Label, Tk


def changecolor():
    newvalue = value.get()
    gui.configure(background = newvalue)
   
gui=Tk()
gui.title("color change.")
gui.configure(background = "gray")
gui.geometry("400x300")

color = Label(gui, text = "color", bg = "gray")
value = Entry(gui)
apply = Button(gui, text = "Apply", fg = "Black", bg = "gray", command = changecolor)

color.grid(row=0,column=0)
value.grid(row=0,column=1)
apply.grid(row=0,column=2)

gui.mainloop()

OUTPUT :






No comments:

Post a Comment

Write a Java program to display given extension files from a specific directory on server machine.

 DOWNLOAD     SLIP14Q2 /** * STEPS TO RUN CODE * Step 01 compile the code * Step 02 run the code * Step 03 give a file directory locatio...