摘要: class cc { public method changtextconstructor { args } {puts $args}}body cc::changtext { args } {set dd [namespace current]::[dd \#auto ]return $dd}# if the class dd is a important class, and class dd {public method chanconstructor {args} {}}body dd::chan { args } {puts $args}cc ttset aa [tt changte 阅读全文
posted @ 2011-08-12 15:57 greencolor 阅读(107) 评论(0) 推荐(0) 编辑
摘要: raise - Change a window's position in the stacking orderbutton .b -text "Hi there!"pack [frame .f -background blue]pack [label .f.l1 -text "This is above"]pack .b -in .fpack [label .f.l2 -text "This is below"]raise .b 阅读全文
posted @ 2011-08-12 15:05 greencolor 阅读(108) 评论(0) 推荐(0) 编辑
摘要: set l_file_handle [::open $a_file r]set content [::read $l_file_handle]::close $l_file_handle 阅读全文
posted @ 2011-08-12 13:12 greencolor 阅读(165) 评论(0) 推荐(0) 编辑
摘要: obtain exe outcatch {exec$executepath << secondcommand} outputstring] 阅读全文
posted @ 2011-08-12 11:22 greencolor 阅读(111) 评论(0) 推荐(0) 编辑
摘要: #Close main windowwm withdraw .# Show main windowwm deiconify . 阅读全文
posted @ 2011-08-12 10:28 greencolor 阅读(114) 评论(0) 推荐(0) 编辑
摘要: class menuthree {inherit itk::Widgetconstructor { args } {#wm protocol [winfo toplevel $itk_component(hull)] WM_DELETE_WINDOW [code $this shutdown]itk_option add hull.width hull.height$itk_component(hull) configure -width 1050 -height 768#wm minsize [winfo toplevel $itk_component(hull)] 1050 768pack 阅读全文
posted @ 2011-08-12 10:04 greencolor 阅读(214) 评论(0) 推荐(0) 编辑
摘要: class menutest { inherit itk::Toplevel constructor { args } {itk_option add hull.menu wm title . "\[No image\" wm resizable . 1 1wm iconbitmap $itk_component(hull) [wm iconbitmap .]wm iconmask $itk_component(hull) [wm iconmask .]wm group $itk_component(hull) .#wm protocol $itk_component(hu 阅读全文
posted @ 2011-08-12 09:50 greencolor 阅读(135) 评论(0) 推荐(0) 编辑