摘要: iwidgets::scrolledcanvas .sc \-textbackground gray \-width 300 \-height 300 \-vscrollmode dynamic \-hscrollmode dynamic \-labeltext "Scrolledcanvas Example".sc create rectangle 100 100 200 200 -fill red.sc create rectangle 300 300 400 400 -fill green.sc create rectangle 200 200 300 300 -fi 阅读全文
posted @ 2011-05-03 22:22 greencolor 阅读(292) 评论(0) 推荐(0)
摘要: iwidgets::regexpfield .fname \ -labeltext "Enter First Name:" \ -fixed 12 \ -regexp {^[a-zA-Z]+$}iwidgets::Labeledwidget::alignlabels .fnamepack .fname\ -fill x \ -expand 1 阅读全文
posted @ 2011-05-03 22:19 greencolor 阅读(164) 评论(0) 推荐(0)
摘要: iwidgets::pushbutton .pb \-text "Go ahead, hit me..." \-command {puts OUCH!!} \-defaultring 1pack .pb \-padx 12 \-pady 12 阅读全文
posted @ 2011-05-03 21:57 greencolor 阅读(161) 评论(0) 推荐(0)
摘要: iwidgets::promptdialog .pd \-labeltext "Enter your security key" \-title "Accessing Security Site" \-modality application####Hide Apply; don't need it. Bring##back Help though; it is hidden by##default##.pd show Help.pd hide Apply.pd buttonconfigure Help \-command {puts " 阅读全文
posted @ 2011-05-03 21:41 greencolor 阅读(214) 评论(0) 推荐(0)
摘要: proc selectProc {} {set os [.om get]puts "The OS chosen is $os"return}; # end selectProc prociwidgets::optionmenu .om \-labeltext "Operating Systems:" \-command selectProcpack .om \-padx 10 \-pady 10####Insert items into the list##foreach o {SunOS HP/UX AIX OS/2 Windows DOS Linux 阅读全文
posted @ 2011-05-03 21:02 greencolor 阅读(229) 评论(0) 推荐(0)