1.窗体图标设置
今天想自己尝试改动Tcl下的窗口图标来着,搜索到在tcl/tk wiki:<How do I give my application a color icon>中的代码如下:
package require Tcl
package require Tk
if { $argc!=1 } {
puts stderr "$argv0 gif_pathname"
exit
}
set icon_pathname [lindex$argv0]
set i [image create photo .i1 -format gif -file$icon_pathname]
set b [button .b1 -text hello]
pack $b
toplevel .icon;pack [label .icon.l -image $i]
wm iconwindow .