Skip to content

ContextMenu Widget

Make a right click context menu.

Parameters

NameTypeDescription
mastertkinter.Tk
showcommandCallable

Methods

configure

Config the context menu

disable

Unbind context menu so it will not show

enable

Bind the context menu so it will show

add_command

Add command menu item. add type for a built-in command ie. type=ContextMenuType.COPY

Parameters

NameTypeDescription
label
command
type

Example

py
import tkinter
import tkinterplus

root = tkinter.Tk()
widget = tkinterplus.ContextMenu(root)
widget.pack()
root.mainloop()

Not associated with or approved by Mojang Studios or Microsoft