X7ROOT File Manager
Current Path:
/usr/share/tk8.6
usr
/
share
/
tk8.6
/
📁
..
📄
bgerror.tcl
(8.05 KB)
📄
button.tcl
(20.16 KB)
📄
choosedir.tcl
(9.43 KB)
📄
clrpick.tcl
(20.93 KB)
📄
comdlg.tcl
(8.04 KB)
📄
console.tcl
(32.02 KB)
📁
demos
📄
dialog.tcl
(5.88 KB)
📄
entry.tcl
(16.55 KB)
📄
focus.tcl
(4.74 KB)
📄
fontchooser.tcl
(15.47 KB)
📄
iconlist.tcl
(15.6 KB)
📄
icons.tcl
(10.63 KB)
📁
images
📄
listbox.tcl
(14.25 KB)
📄
megawidget.tcl
(9.34 KB)
📄
menu.tcl
(37.12 KB)
📄
mkpsenc.tcl
(28.66 KB)
📄
msgbox.tcl
(16.08 KB)
📁
msgs
📄
obsolete.tcl
(5.46 KB)
📄
optMenu.tcl
(1.55 KB)
📄
palette.tcl
(7.74 KB)
📄
panedwindow.tcl
(5.05 KB)
📄
safetk.tcl
(7.21 KB)
📄
scale.tcl
(7.58 KB)
📄
scrlbar.tcl
(12.45 KB)
📄
spinbox.tcl
(15.27 KB)
📄
tclIndex
(19.79 KB)
📄
tearoff.tcl
(5.02 KB)
📄
text.tcl
(32.31 KB)
📄
tk.tcl
(22.6 KB)
📄
tkfbox.tcl
(37.47 KB)
📁
ttk
📄
unsupported.tcl
(10.01 KB)
📄
xmfbox.tcl
(25.46 KB)
Editing: optMenu.tcl
# optMenu.tcl -- # # This file defines the procedure tk_optionMenu, which creates # an option button and its associated menu. # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994 Sun Microsystems, Inc. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # ::tk_optionMenu -- # This procedure creates an option button named $w and an associated # menu. Together they provide the functionality of Motif option menus: # they can be used to select one of many values, and the current value # appears in the global variable varName, as well as in the text of # the option menubutton. The name of the menu is returned as the # procedure's result, so that the caller can use it to change configuration # options on the menu or otherwise manipulate it. # # Arguments: # w - The name to use for the menubutton. # varName - Global variable to hold the currently selected value. # firstValue - First of legal values for option (must be >= 1). # args - Any number of additional values. proc ::tk_optionMenu {w varName firstValue args} { upvar #0 $varName var if {![info exists var]} { set var $firstValue } menubutton $w -textvariable $varName -indicatoron 1 -menu $w.menu \ -relief raised -highlightthickness 1 -anchor c \ -direction flush menu $w.menu -tearoff 0 $w.menu add radiobutton -label $firstValue -variable $varName foreach i $args { $w.menu add radiobutton -label $i -variable $varName } return $w.menu }
Upload File
Create Folder