summaryrefslogtreecommitdiffstats
path: root/tk8.6/library/optMenu.tcl
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-09-22 18:51:12 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-09-22 18:51:12 (GMT)
commit3fa8e6dc88e8041b6cb88d1b1e9c05676d3346b7 (patch)
tree69afbb41089c8358615879f7cd3c4cf7997f4c7e /tk8.6/library/optMenu.tcl
parenta0e17db23c0fd7c771c0afce8cce350c98f90b02 (diff)
downloadblt-3fa8e6dc88e8041b6cb88d1b1e9c05676d3346b7.zip
blt-3fa8e6dc88e8041b6cb88d1b1e9c05676d3346b7.tar.gz
blt-3fa8e6dc88e8041b6cb88d1b1e9c05676d3346b7.tar.bz2
update to tcl/tk 8.6.7
Diffstat (limited to 'tk8.6/library/optMenu.tcl')
-rw-r--r--tk8.6/library/optMenu.tcl43
1 files changed, 0 insertions, 43 deletions
diff --git a/tk8.6/library/optMenu.tcl b/tk8.6/library/optMenu.tcl
deleted file mode 100644
index 7cfdaa0..0000000
--- a/tk8.6/library/optMenu.tcl
+++ /dev/null
@@ -1,43 +0,0 @@
-# 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
-}