This element must an immediate child of the main tic_window()
tic_menu(..., text, tearoff = FALSE, bind = NULL, pack = NULL)Other arguments are parsed as follows:
named argumentsFurther options to be used during the creation of this widget. See the tcl/tk documentation for all arguments possible for this widget.
unnamed argumentsContainer widgets (e.g. tic_frame()) treat any
unnamed arguments as child objects. Non-container widgets
(e.g tic_button()) will
raise an error if there are any unnamed widgets.
Specifies a text string to be displayed inside the widget.
textSimple character string containing the name
textvariableReactive variable containing a string
Can the menu be torn off? Default: FALSE
bind commands to particular events on this element. This may be
a single result of bind_opts() or a list of them for multiple
events.
a named list of pack options for how to incorporate this element into its
parent container. Default: NULL means to use the standard packing.
See pack_opts() as a way of creating a valid list of pack options.
handle on the tcl/tk object
See tcl/tk documentation for more information on this element https://www.tcl.tk/man/tcl8.6/TkCmd/menu.htm
Other widgets:
tic_button(),
tic_canvas(),
tic_checkbutton(),
tic_combobox(),
tic_label(),
tic_menubutton(),
tic_menuitem(),
tic_progressbar(),
tic_radiobutton(),
tic_separator(),
tic_sizegrip(),
tic_slider(),
tic_spinbox(),
tic_submenu(),
tic_textbox(),
tic_textentry()
if (FALSE) {
tic_window(
tic_menu(
text = "Press for menu",
tic_menuitem("Run a command", menutype = "command", command = function() {
message("This is where a command is run")
}),
tic_submenu(
label = "Sub menu here",
tic_menuitem("Run this", "command", command = function() { message("Hello")})
)
)
)
}