tk_optionMenu(n)
π NAME π
Okay bestie, welcome to tk_optionMenu(n) from the Tk Built-In Commands manual β this one is literally about creating an option menubutton and its menu. Slay. β¨
β¨ SYNOPSIS β¨
tk_optionMenu pathName varName value ?value value ...?
π¦ DESCRIPTION π¦
So this procedure creates an option menubutton whose name is pathName, plus an associated menu. Together they let the user pick one of the values given by the value arguments. Iconic behavior, no cap. π«Ά
The current value gets stored in the global variable whose name is given by varName, and it also gets 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. Main character return value energy fr fr. π
πΈ EXAMPLE πΈ
tk_optionMenu .foo myVar Foo Bar Boo Spong Wibble
pack .foo
π KEYWORDS π
option menu
xoxo, your Tk bestie π β this page is serving Tk 4.0 source/version energy and itβs literally tk_optionMenu(n). πβ¨
π¦ where this page comes from
- alpine 3.22: tk-doc 8.6.16-r0 Β· TCL
- alpine 3.23: tk-doc 8.6.17-r0 Β· TCL
- alpine 3.23: tk9-doc 9.0.3-r0 Β· TCL
- alpine 3.24: tk-doc 8.6.17-r1 Β· TCL
- alpine 3.24: tk9-doc 9.0.3-r2 Β· TCL
- arch rolling: tk 8.6.16-1 Β· TCL
- centos-stream 10: tk 1:8.6.13-5.el10 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 43: tk 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 43: tk 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- nixos 26.05: tk 9.0.3
- nixpkgs unstable: tk 9.1.0
- opensuse-leap 16.0: tk 8.6.13-160000.2.2 Β· TCL
- opensuse-leap 16.0: tk 8.6.13-160000.2.2 Β· TCL
- opensuse-leap 16.0: tk 8.6.13-160000.2.2 Β· TCL
- opensuse-leap 16.0: tk 8.6.13-160000.2.2 Β· TCL
- Copyright (c) 1990-1994 The Regents of the University of California
- Copyright (c) 1994-1996 Sun Microsystems, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms