menu -- A menu container widget.


menu [-option value...]




type: list of widget-IDs (default: "")

List of menu items to be included in the menu.


type: string

Name of the widget, can be used to set options in an rc file.


type: boolean (default: 1)

Whether or not the item is sensitve to user input.


type: boolean (default: 1)

Whether the menu can be torn off.


type: string (default: "")

Title of the menu.


type: boolean (default: 1)

Whether or not the item is visible.


A menu is a container widget which is either used in a menubar or as popup to get instantaneous user input.


id delete

Deletes the widget and the associated tcl command.

id configure [-option value...]

Configures the widget. Option may have any of the values accepted on creation of the widget.

id add list-of-widget-Ids

Add widgets to the menu.

id addBegin list-of-widget-Ids

Synonym for add.

id addEnd list-of-widget-Ids

Add widgets at the end of the menu.


set menu [gnocl::menu -title "menu"]
$menu add [gnocl::menuItem -text "%#Save" -onClicked {puts "save"}]
$menu add [gnocl::menuSeparator]
$menu add [gnocl::menuItem -text "%#Quit" -onClicked exit]
$menu popup

results in

See also

menuItem, menuCheckItem, menuRadioItem, menuSeparator, menuBar, GtkMenu