from tkinter import *
import tkinter.messagebox as msb
def btn1_func():
global root
root.geometry("700x700")
root.configure(bg = "gray")
root.title("Задача 3.2")
msb.showinfo("Info window...", "Задача 3.2")
def btn3_func():
root.geometry("500x500")
root.configure(bg = "pink")
root.title("Задача 3.1")
msb.showinfo("Info window...", "Задача 3.1")
root = Tk()
root.title("Window title...")
root.geometry("1000x600")
root.configure(bg="lightgreen")
btn1 = Button(master=root, text="Button-1", command = btn1_func)
btn3 = Button(master=root, text="Button-3", command = btn3_func)
btn1.pack()
btn3.pack()
root.mainloop()
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
from tkinter import *
import tkinter.messagebox as msb
def btn1_func():
global root
root.geometry("700x700")
root.configure(bg = "gray")
root.title("Задача 3.2")
msb.showinfo("Info window...", "Задача 3.2")
def btn3_func():
global root
root.geometry("500x500")
root.configure(bg = "pink")
root.title("Задача 3.1")
msb.showinfo("Info window...", "Задача 3.1")
root = Tk()
root.title("Window title...")
root.geometry("1000x600")
root.configure(bg="lightgreen")
btn1 = Button(master=root, text="Button-1", command = btn1_func)
btn3 = Button(master=root, text="Button-3", command = btn3_func)
btn1.pack()
btn3.pack()
root.mainloop()