⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 optmenu.tcl

📁 linux 下的源代码分析阅读器 red hat公司新版
💻 TCL
字号:
proc About {} {    return "Testing Option Menu widget"}proc Test {} {    tixOptionMenu .p -label "From File Format : " -command "selectproc input" \	-disablecallback 1 \	-options {	    label.width 19	    label.anchor e	    menubutton.width 15	}    pack .p    .p add command text   -label "Plain Text"    .p add command post   -label "PostScript"          .p add command format -label "Formatted Text"      .p add command html   -label "HTML"                .p add separator sep    .p add command tex    -label "LaTeX"               .p add command rtf    -label "Rich Text Format"    update    foreach ent [.p entries] {	test {.p delete $ent}    }    Assert {[.p subwidget menubutton cget -text] == {}}    test {destroy .p}    # Testing deleting "sep" at the end    #    tixOptionMenu .p -label "From File Format : " -command "selectproc input" \	-disablecallback 1 \	-options {	    label.width 19	    label.anchor e	    menubutton.width 15	}    pack .p    .p add command text   -label "Plain Text"    .p add command post   -label "PostScript"          .p add command format -label "Formatted Text"      .p add command html   -label "HTML"                .p add separator sep    .p add command tex    -label "LaTeX"               .p add command rtf    -label "Rich Text Format"    test {.p delete text}    test {.p delete post}    test {.p delete html}    test {.p delete format}    test {.p delete tex}    test {.p delete rtf}    test {.p delete sep}    Assert {[.p subwidget menubutton cget -text] == {}}    test {destroy .p}    # Testing deleting "sep" as the second-last one    #    tixOptionMenu .p -label "From File Format : " -command "selectproc input" \	-disablecallback 1 \	-options {	    label.width 19	    label.anchor e	    menubutton.width 15	}    pack .p    .p add command text   -label "Plain Text"    .p add command post   -label "PostScript"          .p add command format -label "Formatted Text"      .p add command html   -label "HTML"                .p add separator sep    .p add command tex    -label "LaTeX"               .p add command rtf    -label "Rich Text Format"    test {.p delete text}    global .p    Assert {[info exists .p(text,type)] == 0}    Assert {[info exists .p(text,name)] == 0}    Assert {[info exists .p(text,label)] == 0}    test {.p delete post}    test {.p delete html}    test {.p delete format}    test {.p delete tex}    Assert {[.p cget -value] == "rtf"}    test {.p delete sep}    Assert {[.p cget -value] == "rtf"}    test {.p delete rtf}    Assert {[.p subwidget menubutton cget -text] == {}}    test {destroy .p}}

⌨️ 快捷键说明

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