[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.149.27.160: ~ $
# 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
}

Filemanager

Name Type Size Permission Actions
demos Folder 0755
images Folder 0755
msgs Folder 0755
ttk Folder 0755
bgerror.tcl File 7.93 KB 0644
button.tcl File 19.5 KB 0644
choosedir.tcl File 9.42 KB 0644
clrpick.tcl File 20.8 KB 0644
comdlg.tcl File 7.54 KB 0644
console.tcl File 28.94 KB 0644
dialog.tcl File 5.87 KB 0644
entry.tcl File 16.55 KB 0644
focus.tcl File 4.74 KB 0644
listbox.tcl File 13.65 KB 0644
menu.tcl File 36.86 KB 0644
mkpsenc.tcl File 26.56 KB 0644
msgbox.tcl File 16.64 KB 0644
obsolete.tcl File 5.46 KB 0644
optMenu.tcl File 1.55 KB 0644
palette.tcl File 7.68 KB 0644
panedwindow.tcl File 5.05 KB 0644
safetk.tcl File 7.09 KB 0644
scale.tcl File 7.43 KB 0644
scrlbar.tcl File 11.72 KB 0644
spinbox.tcl File 14.73 KB 0644
tclIndex File 21.77 KB 0644
tearoff.tcl File 5.02 KB 0644
text.tcl File 31.72 KB 0644
tk.tcl File 17.66 KB 0644
tkfbox.tcl File 52.78 KB 0644
unsupported.tcl File 11.12 KB 0644
xmfbox.tcl File 25.37 KB 0644