1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
from tkinter import *
from tkinter import messagebox
def edit_click():
messagebox.showinfo("GUI Python", "Нажата опция Edit")
root = Tk()
root.title("GUI на Python")
root.geometry("300x250")
main_menu = Menu()
main_menu.add_cascade(label="File")
main_menu.add_cascade(label="Edit", command=edit_click)
main_menu.add_cascade(label="View")
root.config(menu=main_menu)
root.mainloop()
|