📄 scope1.tcl
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -