/opt/imh/python3.13/lib/tk8.6
NameSizeModeActions
demos/-0755rm
images/-0755rm
msgs/-0755rm
ttk/-0755rm
bgerror.tcl85340644editdlrm
button.tcl208300644editdlrm
choosedir.tcl96990644editdlrm
clrpick.tcl213450644editdlrm
comdlg.tcl83680644editdlrm
console.tcl321940644editdlrm
dialog.tcl58130644editdlrm
entry.tcl182430644editdlrm
focus.tcl48570644editdlrm
fontchooser.tcl177770644editdlrm
iconlist.tcl167410644editdlrm
icons.tcl108840644editdlrm
listbox.tcl146950644editdlrm
megawidget.tcl95650644editdlrm
menu.tcl388280644editdlrm
mkpsenc.tcl293520644editdlrm
msgbox.tcl163590644editdlrm
obsolete.tcl55940644editdlrm
optMenu.tcl15860644editdlrm
palette.tcl81740644editdlrm
panedwindow.tcl51760644editdlrm
pkgIndex.tcl1500644editdlrm
safetk.tcl73700644editdlrm
scale.tcl83860644editdlrm
scrlbar.tcl127320644editdlrm
spinbox.tcl159490644editdlrm
tclIndex202700644editdlrm
tearoff.tcl44680644editdlrm
text.tcl339410644editdlrm
tk.tcl236140644editdlrm
tkAppInit.c46150644editdlrm
tkfbox.tcl383650644editdlrm
unsupported.tcl102520644editdlrm
xmfbox.tcl260020644editdlrm
Edit: /opt/imh/python3.13/lib/tk8.6/listbox.tcl (14695B)
# listbox.tcl -- # # This file defines the default bindings for Tk listbox widgets # and provides procedures that help in implementing those bindings. # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1995 Sun Microsystems, Inc. # Copyright (c) 1998 by Scriptics Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. #-------------------------------------------------------------------------- # tk::Priv elements used in this file: # # afterId - Token returned by "after" for autoscanning. # listboxPrev - The last element to be selected or deselected # during a selection operation. # listboxSelection - All of the items that were selected before the # current selection operation (such as a mouse # drag) started; used to cancel an operation. #-------------------------------------------------------------------------- #------------------------------------------------------------------------- # The code below creates the default class bindings for listboxes. #------------------------------------------------------------------------- # Note: the check for existence of %W below is because this binding # is sometimes invoked after a window has been deleted (e.g. because # there is a double-click binding on the widget that deletes it). Users # can put "break"s in their bindings to avoid the error, but this check # makes that unnecessary. bind Listbox <1> { if {[winfo exists %W]} { tk::ListboxBeginSelect %W [%W index @%x,%y] 1 } } # Ignore double clicks so that users can define their own behaviors. # Among other things, this prevents errors if the user deletes the # listbox on a double click. bind Listbox { # Empty script } bind Listbox { set tk::Priv(x) %x set tk::Priv(y) %y tk::ListboxMotion %W [%W index @%x,%y] } bind Listbox { tk::CancelRepeat %W activate @%x,%y } bind Listbox { tk::ListboxBeginExtend %W [%W index @%x,%y] } bind Listbox { tk::ListboxBeginToggle %W [%W index @%x,%y] } bind Listbox { set tk::Priv(x) %x set tk::Priv(y) %y tk::ListboxAutoScan %W } bind Listbox { tk::CancelRepeat } bind Listbox <> { tk::ListboxUpDown %W -1 } bind Listbox <> { tk::ListboxExtendUpDown %W -1 } bind Listbox <> { tk::ListboxUpDown %W 1 } bind Listbox <> { tk::ListboxExtendUpDown %W 1 } bind Listbox <> { %W xview scroll -1 units } bind Listbox <> { %W xview scroll -1 pages } bind Listbox <> { %W xview scroll 1 units } bind Listbox <> { %W xview scroll 1 pages } bind Listbox { %W yview scroll -1 pages %W activate @0,0 } bind Listbox { %W yview scroll 1 pages %W activate @0,0 } bind Listbox { %W xview scroll -1 pages } bind Listbox { %W xview scroll 1 pages } bind Listbox <> { %W xview moveto 0 } bind Listbox <> { %W xview moveto 1 } bind Listbox { %W activate 0 %W see 0 %W selection clear 0 end %W selection set 0 tk::FireListboxSelectEvent %W } bind Listbox { tk::ListboxDataExtend %W 0 } bind Listbox { %W activate end %W see end %W selection clear 0 end %W selection set end tk::FireListboxSelectEvent %W } bind Listbox { tk::ListboxDataExtend %W [%W index end] } bind Listbox <> { if {[selection own -displayof %W] eq "%W"} { clipboard clear -displayof %W clipboard append -displayof %W [selection get -displayof %W] } } bind Listbox { tk::ListboxBeginSelect %W [%W index active] } bind Listbox <> { tk::ListboxBeginSelect %W [%W index active] } bind Listbox