scope1.tcl

来自「这是一个Linux下的集成开发环境」· TCL 代码 · 共 55 行

TCL
55
字号
proc About {} {    return "Testing creation of Tix widgets inside ITCL classes"}proc Test {} {    class foo {        inherit itk::Widget        constructor {args} {	    itk_component add lab {		label $itk_interior.lab \		    -textvariable [code choice($this)]	    }	    itk_component add le {		tixOptionMenu $itk_interior.le \		    -label "File format" \		    -variable [code choice($this)] \		    -command "$this foocmd"	    }	    foreach cmd {HTML PostScript ASCII} {		$itk_component(le) add command $cmd	    }	    pack $itk_component(lab) $itk_component(le) \		-anchor e \		-padx 10 \		-pady 10 \		-fill x	    eval itk_initialize $args        }        common choice	method foocmd {args} {	    puts $args	}        method set_format {format} {	    set choice($this) $format        }    }    usual TixOptionMenu {    }    foo .xy    pack .xy    .xy set_format ASCII    update    .xy component le config -value  PostScript    update    .xy component le config -value  HTML}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?