from tkinter import *
import webbrowser
class FuncButton:
@staticmethod
def btn1():
pass
@staticmethod
def btn2():
pass
@staticmethod
def btn3():
pass
@staticmethod
def website():
site_root = Tk()
site_root.geometry('600x500')
site_root.title('New window')
site_root.resizable(width=False, height=False)
btnSc = Button(site_root, text='Проба', bg='blue', font=('Arial', 16, 'bold'),
command=lambda: webbrowser.get(using=None).open_new_tab('https://www.youtube.com'))
btnSc.place(x=50, y=50) # Используем place вместо pack
site_root.mainloop()
main_root = Tk()
main_root.geometry('600x500')
main_root.title('Main window!')
main_root.resizable(width=False, height=False)
main_root.image = PhotoImage(file='BG.png')
bg_logo = Label(main_root, image=main_root.image)
bg_logo.grid(row=0, column=0)
btnOne = Button(main_root, text='ONE', bg='yellow', font=('Arial', 16, 'bold'),
command=lambda: FuncButton.btn1())
btnOne.place(x=88, y=155, width=195, height=40)
btnTwo = Button(main_root, text='TWO', bg='red', font=('Arial', 16, 'bold'),
command=lambda: FuncButton.btn2())
btnTwo.place(x=88, y=200, width=195, height=40)
btnThree = Button(main_root, text='THREE', bg='pink', font=('Arial', 16, 'bold'),
command=lambda: FuncButton.btn3())
btnThree.place(x=88, y=245, width=195, height=40)
btnS = Button(main_root, text='WEBSITE', bg='lightgreen', font=('Arial', 16, 'bold'),
command=lambda: FuncButton.website())
btnS.place(x=88, y=290, width=195, height=40)
main_root.mainloop()