Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Thursday, June 13, 2019
 
 

tk_optionMenu (1t)

Name

tk_optionMenu - Create an option menubutton and its menu

Synopsis

tk_optionMenu pathName varName value ?value value ...?

Description

tk_optionMenu(1t)            Tk Built-In Commands            tk_optionMenu(1t)



______________________________________________________________________________

NAME
       tk_optionMenu - Create an option menubutton and its menu

SYNOPSIS
       tk_optionMenu pathName varName value ?value value ...?
______________________________________________________________________________

DESCRIPTION
       This  procedure  creates  an  option menubutton whose name is pathName,
       plus an associated menu.  Together they allow the user to select one of
       the  values  given  by  the value arguments.  The current value will be
       stored in the global variable whose name is given  by  varName  and  it
       will also be displayed as the label in the option menubutton.  The user
       can click on the menubutton to display a menu  containing  all  of  the
       values  and  thereby select a new value.  Once a new value is selected,
       it will be stored in the variable and appear in the option  menubutton.
       The current value can also be changed by setting the variable.

       The  return value from tk_optionMenu is the name of the menu associated
       with pathName, so that the caller can change its configuration  options
       or manipulate it in other ways.

EXAMPLE
              tk_optionMenu .foo myVar Foo Bar Boo Spong Wibble
              pack .foo

KEYWORDS
       option menu



ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+------------------+
       |ATTRIBUTE TYPE | ATTRIBUTE VALUE  |
       +---------------+------------------+
       |Availability   | runtime/tk-8     |
       +---------------+------------------+
       |Stability      | Uncommitted      |
       +---------------+------------------+
NOTES
       This     software     was    built    from    source    available    at
       https://github.com/oracle/solaris-userland.   The  original   community
       source        was        downloaded        from         https://source-
       forge.net/projects/tcl/files/Tcl/8.6.7/tk8.6.7-src.tar.gz/download

       Further information about this software can be found on the open source
       community website at https://www.tcl.tk/.



Tk                                    4.0                    tk_optionMenu(1t)