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

📄 mkmanag.tcl

📁 This Source-Navigator, an IDE for C/C++/Fortran/Java/Tcl/PHP/Python and a host of other languages.
💻 TCL
字号:
# MkManag.tcl --##	This file implements the "Manager" page in the widget demo##	This file has not been properly documented. It is NOT intended#	to be used as an introductory demo program about Tix#	programming. For such demos, please see the files in the#	demos/samples directory or go to the "Samples" page in the#	"widget demo"### Copyright (c) 1996, Expert Interface Technologies## See the file "license.terms" for information on usage and redistribution# of this file, and for a DISCLAIMER OF ALL WARRANTIES.#proc MkManager {nb page} {    set w [$nb subwidget $page]    set name [tixOptionName $w]    option add *$name*TixLabelFrame*label.padX 4    tixLabelFrame $w.pane -label "tixPanedWindow"    tixLabelFrame $w.note -label "tixNoteBook"    MkPanedWindow [$w.pane subwidget frame]    MkNoteBook    [$w.note subwidget frame]    tixForm $w.pane -top 0 -left 0   -right $w.note -bottom -1    tixForm $w.note -top 0  -right -1 -bottom -1}proc MkPanedWindow {w} {    set name [tixOptionName $w]    message $w.msg -font -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*\	-relief flat -width 240 -anchor n\	-text {The PanedWindow widget allows the user to interactively\manipulate the\sizes of several panes. The panes can be arranged either vertically or\horizontally.}    label $w.group -text "Newsgroup: comp.lang.tcl"    tixPanedWindow $w.pane    set p1 [$w.pane add list -min 70 -size 100]    set p2 [$w.pane add text -min 70]    tixScrolledListBox $p1.list    $p1.list subwidget listbox config -font [tix option get fixed_font]    tixScrolledText    $p2.text    $p2.text subwidget text    config -font [tix option get fixed_font]    $p1.list subwidget listbox insert end \	"  12324 Re: TK is good for your health" \	"+ 12325 Re: TK is good for your health" \	"+ 12326 Re: Tix is even better for your health (Was: TK is good...)" \	"  12327 Re: Tix is even better for your health (Was: TK is good...)" \	"+ 12328 Re: Tix is even better for your health (Was: TK is good...)" \	"  12329 Re: Tix is even better for your health (Was: TK is good...)" \	"+ 12330 Re: Tix is even better for your health (Was: TK is good...)"    $p2.text subwidget text config -wrap none -bg \	[$p1.list subwidget listbox cget -bg]    $p2.text subwidget text insert end {Mon, 19 Jun 1995 11:39:52        comp.lang.tcl              Thread   34 of  220Lines 353       A new way to put text and bitmaps together iNo responsesioi@xpi.com                  Ioi K. Lam at Expert Interface TechnologiesHi,I have implemented a new image type called "compound". It allows youto glue together a bunch of bitmaps, images and text strings togetherto form a bigger image. Then you can use this image with widgets thatsupport the -image option. This way you can display very fancy stuffsin your GUI. For example, you can display a text string stringtogether with a bitmap, at the same time, inside a TK button widget. Ascreenshot of compound images can be found at the bottom of this page:        http://www.xpi.com/tix/screenshot.htmlYou can also you is in other places such as putting fancy bitmap+textin menus, tabs of tixNoteBook widgets, etc. This feature will beincluded in the next release of Tix (4.0b1). Count on it to make jazzyinterfaces!}    pack $p1.list -expand yes -fill both -padx 4 -pady 6    pack $p2.text -expand yes -fill both -padx 4 -pady 6    pack $w.msg   -side top -padx 3 -pady 3 -fill both    pack $w.group -side top -padx 3 -pady 3 -fill both    pack $w.pane  -side top -padx 3 -pady 3 -expand yes -fill both}proc MkNoteBook  {w} {    message $w.msg -font -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*\	-relief flat -width 240 -anchor n\	-text {The NoteBook widget allows you to lay out a complex\interface into individual pages.}    # We use these options to set the sizes of the subwidgets inside the    # notebook, so that they are well-aligned on the screen.    #    set name [tixOptionName $w]    option add *$name*TixControl*entry.width 10    option add *$name*TixControl*label.width 18    option add *$name*TixControl*label.anchor e    option add *$name*TixNoteBook*tagPadX 8    tixNoteBook $w.nb -ipadx 6 -ipady 6    # Create the two tabs on the notebook. The -underline option    # puts a underline on the first character of the labels of the tabs.    # Keyboard accelerators will be defined automatically according    # to the underlined character.	    #    $w.nb add hard_disk -label "Hard Disk" -underline 8    $w.nb add network   -label "Network"   -underline 0       # Create the first page    #    set f [$w.nb subwidget hard_disk]    # the frame for the buttons that are present in all the pages    #    frame $f.common    pack $f.common -side right -padx 2 -pady 2 -fill y    CreateCommonButtons $w $f.common    # Create the controls that only belong to this page    #    tixControl $f.a -value 12   -label "Access Time: "    tixControl $f.w -value 400  -label "Write Throughput: "    tixControl $f.r -value 400  -label "Read Throughput: "    tixControl $f.c -value 1021 -label "Capacity: "    pack $f.a $f.w $f.r $f.c  -side top -padx 20 -pady 2        # Create the second page	    #    set f [$w.nb subwidget network]    # the frame for the buttons that are present in all the pages    #    frame $f.common    pack $f.common -side right -padx 2 -pady 2 -fill y    tixControl $f.a -value 12   -label "Access Time: "    tixControl $f.w -value 400  -label "Write Throughput: "    tixControl $f.r -value 400  -label "Read Throughput: "    tixControl $f.c -value 1021 -label "Capacity: "    tixControl $f.u -value 10   -label "Users: "        CreateCommonButtons $w $f.common    pack $f.a $f.w $f.r $f.c $f.u -side top -padx 20 -pady 2    pack $w.msg  -side top -padx 3 -pady 3 -fill both    pack $w.nb   -expand yes -fill both -padx 5 -pady 5 -side top }proc CreateCommonButtons {w f} {    button $f.ok     -text OK     -width 6    button $f.cancel -text Cancel -width 6    pack $f.ok $f.cancel -side top -padx 2 -pady 2}

⌨️ 快捷键说明

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