码迷,mamicode.com
首页 > 其他好文 > 详细

一段tcl代码

时间:2015-01-27 00:18:57      阅读:258      评论:0      收藏:0      [点我收藏+]

标签:

#!/usr/bin/wish
proc icanspeak {} {
    set name [.ent get]
    if {[string length $name] != 0} {
        exec s $name
    }
}

label .lab -text "Enter word:"
entry .ent
button .but -text "<\")))><" -command "icanspeak"

#pack .lab
pack .ent
pack .but

bind . <Return> ".but invoke"

set width 145
set height 60
set x [expr { ( [winfo screenwidth  .] - $width  ) }]
set y [expr { ( [winfo screenheight .] - $height ) }]


wm title . "><(((\">"
wm geometry . ${width}x${height}+${x}+${y}

wm attributes . -topmost 1

 

一段tcl代码

标签:

原文地址:http://www.cnblogs.com/lightlfyan/p/4251627.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!