bindtag.tk

来自「Linux程序设计(原书第2版)源码」· TK 代码 · 共 29 行

TK
29
字号
#!/usr/bin/wish -fset count 0button .b -text "Tick(ms)"label .ticker -textvariable countpack .b .tickerbind timer <ButtonPress-1> {    set count 0    StartTimer %W } bind timer <ButtonRelease-1> {    StopTimer %W } proc StartTimer { widget } {    global pending count    incr count 200    set pending [after 200 [list StartTimer $widget]]} proc StopTimer { widget } {    global pending    after cancel $pending} bindtags .b [linsert [bindtags .b] 0  timer]

⌨️ 快捷键说明

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