tkinter.Menu.add_command

Definition
Add command menu item.

Syntax
add_command(self, cnf={}, **kw)

Examples
The Menu was created through Menu() and configure in the Tk() widget.
from tkinter import*

master=Tk()

menu1=Menu(master)

menu.add_command(label="Menu # 1")
menu.add_command(label="Menu # 2")
menu.add_command(label="Menu # 3")
menu.add_command(label="Menu # 4")
menu.add_command(label="Menu # 5")
menu.add_command(label="Menu # 6")

master.config(m=menu)




Comments