
tcl的GUI可用Tk來撰寫,下面就是一個簡單的button
#!/usr/bin/wish
button .a -text "早上" -command { puts "跑步" }
button .b -text "中午" -command { puts "休息" }
button .c -text "晚上" -command { puts "睡覺" }
button .d -text "離開" -command { exit }
pack .a .b .c .d -side top -fill x
沒有留言:
張貼留言