calendar.tcl

来自「用于TCL/TK的可视化集成开发环境.(GUI)」· TCL 代码 · 共 1,278 行 · 第 1/3 页

TCL
1,278
字号
# ClonePath = .frame3.frame18# The above line makes pasting MUCH easier for me.# It contains the pathname of the cutted widget.  # build widget .frame3.frame18  frame .frame3.frame18 \    -borderwidth {2} \    -relief {raised} \    -background {#dcdcdc} \    -height {30} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -width {30}  # build widget .frame3.frame18.frame19  frame .frame3.frame18.frame19 \    -background {#dcdcdc} \    -height {20} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -width {280}  # build widget .frame3.frame18.frame19.canvas20  canvas .frame3.frame18.frame19.canvas20 \    -background {#dcdcdc} \    -borderwidth {1} \    -height {16} \    -highlightbackground {#ffffff} \    -highlightcolor {#000000} \    -insertbackground {black} \    -relief {raised} \    -selectbackground {black} \    -selectforeground {#fffff0} \    -width {16}  # bindings  bind .frame3.frame18.frame19.canvas20 <Button-1> {%W configure -relief sunken -background gray90}  bind .frame3.frame18.frame19.canvas20 <ButtonRelease-1> {if {"[winfo containing %X %Y]" == "%W"} {    calendar_addmonths -1  }%W configure -relief raised -background #dcdcdc}  # build widget .frame3.frame18.frame19.label21  label .frame3.frame18.frame19.label21 \    -activebackground {#dcdcdc} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {0} \    -font {Helvetica 10 bold} \    -foreground {#000000} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -text {Jan 2000} \    -textvariable {calMonth} \    -width {12}  # build widget .frame3.frame18.frame19.canvas22  canvas .frame3.frame18.frame19.canvas22 \    -background {#dcdcdc} \    -borderwidth {1} \    -height {16} \    -highlightbackground {#ffffff} \    -highlightcolor {#000000} \    -insertbackground {black} \    -relief {raised} \    -selectbackground {black} \    -selectforeground {#fffff0} \    -width {16}  # bindings  bind .frame3.frame18.frame19.canvas22 <Button-1> {%W configure -relief sunken -background gray90}  bind .frame3.frame18.frame19.canvas22 <ButtonRelease-1> {if {"[winfo containing %X %Y]" == "%W"} {    calendar_addmonths 1  }%W configure -relief raised -background #dcdcdc}  # build widget .frame3.frame18.frame23  frame .frame3.frame18.frame23 \    -background {#dcdcdc} \    -height {27} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -width {165}  # build widget .frame3.frame18.frame23.button24  button .frame3.frame18.frame23.button24 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(1)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -state {disabled} \    -textvariable {cday(1)} \    -width {2}  # build widget .frame3.frame18.frame23.button25  button .frame3.frame18.frame23.button25 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(2)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -state {disabled} \    -textvariable {cday(2)} \    -width {2}  # build widget .frame3.frame18.frame23.button26  button .frame3.frame18.frame23.button26 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(3)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -state {disabled} \    -textvariable {cday(3)} \    -width {2}  # build widget .frame3.frame18.frame23.button27  button .frame3.frame18.frame23.button27 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(4)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -state {disabled} \    -textvariable {cday(4)} \    -width {2}  # build widget .frame3.frame18.frame23.button28  button .frame3.frame18.frame23.button28 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(5)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -state {disabled} \    -textvariable {cday(5)} \    -width {2}  # build widget .frame3.frame18.frame23.button29  button .frame3.frame18.frame23.button29 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(6)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {red} \    -highlightcolor {blue} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -state {disabled} \    -textvariable {cday(6)} \    -width {2}  # build widget .frame3.frame18.frame23.button30  button .frame3.frame18.frame23.button30 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(7)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -text {1} \    -textvariable {cday(7)} \    -width {2}  # build widget .frame3.frame18.frame31  frame .frame3.frame18.frame31 \    -background {#dcdcdc} \    -height {27} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -width {165}  # build widget .frame3.frame18.frame31.button24  button .frame3.frame18.frame31.button24 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(8)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -text {2} \    -textvariable {cday(8)} \    -width {2}  # build widget .frame3.frame18.frame31.button25  button .frame3.frame18.frame31.button25 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(9)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -text {3} \    -textvariable {cday(9)} \    -width {2}  # build widget .frame3.frame18.frame31.button26  button .frame3.frame18.frame31.button26 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(10)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -text {4} \    -textvariable {cday(10)} \    -width {2}  # build widget .frame3.frame18.frame31.button27  button .frame3.frame18.frame31.button27 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(11)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -text {5} \    -textvariable {cday(11)} \    -width {2}  # build widget .frame3.frame18.frame31.button28  button .frame3.frame18.frame31.button28 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(12)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -text {6} \    -textvariable {cday(12)} \    -width {2}  # build widget .frame3.frame18.frame31.button29  button .frame3.frame18.frame31.button29 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(13)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {red} \    -highlightcolor {blue} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -text {7} \    -textvariable {cday(13)} \    -width {2}  # build widget .frame3.frame18.frame31.button30  button .frame3.frame18.frame31.button30 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(14)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -text {8} \    -textvariable {cday(14)} \    -width {2}  # build widget .frame3.frame18.frame32  frame .frame3.frame18.frame32 \    -background {#dcdcdc} \    -height {27} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -width {165}  # build widget .frame3.frame18.frame32.button24  button .frame3.frame18.frame32.button24 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(15)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -text {9} \    -textvariable {cday(15)} \    -width {2}  # build widget .frame3.frame18.frame32.button25  button .frame3.frame18.frame32.button25 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(16)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -text {10} \    -textvariable {cday(16)} \    -width {2}  # build widget .frame3.frame18.frame32.button26  button .frame3.frame18.frame32.button26 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(17)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -text {11} \    -textvariable {cday(17)} \    -width {2}  # build widget .frame3.frame18.frame32.button27  button .frame3.frame18.frame32.button27 \    -activebackground {gray75} \    -activeforeground {#000000} \    -background {#dcdcdc} \    -borderwidth {1} \    -command {calendar_selDay $cday(18)} \    -font {Helvetica 10} \    -foreground {#000000} \    -highlightbackground {#dcdcdc} \    -highlightcolor {#000000} \    -highlightthickness {0} \    -padx 2 -pady 0 \    -relief {flat} \    -text {12} \    -textvariable {cday(18)} \    -width {2}  # build widget .frame3.frame18.frame32.button28  button .frame3.frame18.frame32.button28 \    -activebackground {gray75} \    -activeforeground {#000000} \

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?