📄 faxmail.tcl
字号:
-label {Image} } # build widget .tt frame .tt \ -borderwidth {4} \ -relief {ridge} # build widget .tt.f frame .tt.f \ -borderwidth {2} # build widget .tt.f.b2 button .tt.f.b2 \ -command {.tt.t delete 1.0 end} \ -foreground {Blue} \ -padx {9} \ -pady {3} \ -text {CLEAR} # build widget .tt.f.label3 label .tt.f.label3 \ -borderwidth {4} \ -text {Email-Fax Text Message:} # build widget .tt.t text .tt.t \ -highlightthickness {1} \ -yscrollcommand {.tt.scroll set} \ -height {15} # build widget .tt.scroll scrollbar .tt.scroll \ -command {.tt.t yview} # build widget .w frame .w frame .w.top frame .w.top.left frame .w.top.right frame .w.bot # build widget .w.top.left.label label .w.top.left.label \ -text {COUNTRY CODE:} # build widget .w.topright.label label .w.top.right.label \ -text {LOCAL CODE:} # build widget .w.bot.label label .w.bot.label \ -text {FAX NUMBER:} # build widget .w.bot.check button .w.bot.check \ -command {checknum 1} \ -foreground {blue} \ -padx {9} \ -pady {3} \ -text {CHECK COVERAGE} # build widget .w.top.left.entry entry .w.top.left.entry \ -textvariable {recipient(country)} \ -width {4} # build widget .w.top.right.entry entry .w.top.right.entry \ -textvariable {recipient(local)} \ -width {4} # build widget .w.bot.entry entry .w.bot.entry \ -textvariable {recipient(number)} \ -width {40} # build widget .ww frame .ww # build widget .ww.label5 label .ww.label5 \ -text {RECIPIENT'S NAME:} # build widget .ww.label6 label .ww.label6 \ -text {ORGANISATION:} # build widget .ww.label7 label .ww.label7 \ -text {DEPARTMENT:} # build widget .ww.label8 label .ww.label8 \ -text {EMAIL:} # build widget .ww.entry5 entry .ww.entry5 \ -textvariable {recipient(name)} \ -width {40} # build widget .ww.entry6 entry .ww.entry6 \ -textvariable {recipient(organisation)} \ -width {40} # build widget .ww.entry7 entry .ww.entry7 \ -textvariable {recipient(department)} \ -width {40} # build widget .ww.entry8 entry .ww.entry8 \ -textvariable {recipient(email)} \ -width {40} # build widget .label0 label .label0 # pack master .b pack configure .b.b1 \ -side left pack configure .b.b4 \ -side left pack configure .b.b3 \ -side left pack configure .b.b6 \ -side left pack configure .b.b5 \ -side left pack configure .b.b2 \ -side right pack configure .b.b7 \ -side left # pack child .p.buttons pack configure .p.buttons.add \ -side top -fill x pack configure .p.buttons.del \ -side top # pack child .p.list# pack configure .p.list.sx -side bottom -fill x pack configure .p.list.sy -side right -fill y pack configure .p.list.box -side left -fill both -expand true # pack master .p pack configure .p.label1 \ -anchor w \ -side left pack configure .p.list \ -anchor w \ -side left pack configure .p.buttons \ -anchor e \ -side right # pack master .tt pack configure .tt.f \ -expand 1 \ -fill x pack configure .tt.scroll \ -fill y \ -side right pack configure .tt.t \ -anchor w # pack master .tt.f pack configure .tt.f.b2 \ -side right pack configure .tt.f.label3 \ -anchor w \ -side left # pack master .w pack configure .w.top.left.label \ -side top \ -anchor w pack configure .w.top.left.entry \ -side top \ -anchor w pack configure .w.top.right.label \ -side top \ -anchor w pack configure .w.top.right.entry \ -side top \ -anchor w pack configure .w.bot.label \ -side top \ -anchor w pack configure .w.bot.entry \ -side top \ -anchor w pack configure .w.bot.check \ -side top \ -fill y \ -anchor center pack .w.top.left .w.top.right -side left -expand true -fill x pack .w.top -side top -fill x pack .w.bot -side top -fill y # pack master .ww pack configure .ww.label5 \ -anchor w pack configure .ww.entry5 \ -anchor w pack configure .ww.label6 \ -anchor w pack configure .ww.entry6 \ -anchor w pack configure .ww.label8 \ -anchor w pack configure .ww.entry8 \ -anchor w # pack master .www pack configure .www.label9 \ -side left pack configure .www.entry16 \ -side left # pack master . pack configure .b pack configure .www \ -expand 1 \ -fill x \ -padx 8 pack configure .p \ -expand 1 \ -fill x \ -padx 9 pack configure .tt pack configure .w \ -side left -fill y pack configure .ww \ -side right pack configure .label0 .tt.t insert end {} if {"[info procs XFEdit]" != ""} { catch "XFMiscBindWidgetTree ." after 2 "catch {XFEditSetShowWindows}" }}# User defined procedures# Procedure: FSBoxproc FSBox { {fsBoxMessage "Select file:"} {fsBoxFileName ""} {fsBoxActionOk ""} {fsBoxActionCancel ""}} {# xf ignore me 5########### Procedure: FSBox# Description: show file selector box# Arguments: fsBoxMessage - the text to display# fsBoxFileName - a file name that should be selected# fsBoxActionOk - the action that should be performed on ok# fsBoxActionCancel - the action that should be performed on cancel# Returns: the filename that was selected, or nothing# Sideeffects: none########### # global fsBox(activeBackground) - active background color# global fsBox(activeForeground) - active foreground color# global fsBox(background) - background color# global fsBox(font) - text font# global fsBox(foreground) - foreground color# global fsBox(extensions) - scan directory for extensions# global fsBox(scrollActiveForeground) - scrollbar active background color# global fsBox(scrollBackground) - scrollbar background color# global fsBox(scrollForeground) - scrollbar foreground color# global fsBox(scrollSide) - side where scrollbar is located global fsBox set tmpButtonOpt "" set tmpFrameOpt "" set tmpMessageOpt "" set tmpScaleOpt "" set tmpScrollOpt "" if {"$fsBox(activeBackground)" != ""} { append tmpButtonOpt "-activebackground \"$fsBox(activeBackground)\" " } if {"$fsBox(activeForeground)" != ""} { append tmpButtonOpt "-activeforeground \"$fsBox(activeForeground)\" " } if {"$fsBox(background)" != ""} { append tmpButtonOpt "-background \"$fsBox(background)\" " append tmpFrameOpt "-background \"$fsBox(background)\" " append tmpMessageOpt "-background \"$fsBox(background)\" " } if {"$fsBox(font)" != ""} { append tmpButtonOpt "-font \"$fsBox(font)\" " append tmpMessageOpt "-font \"$fsBox(font)\" " } if {"$fsBox(foreground)" != ""} { append tmpButtonOpt "-foreground \"$fsBox(foreground)\" " append tmpMessageOpt "-foreground \"$fsBox(foreground)\" " } if {"$fsBox(scrollActiveForeground)" != ""} { append tmpScrollOpt "-activeforeground \"$fsBox(scrollActiveForeground)\" " } if {"$fsBox(scrollBackground)" != ""} { append tmpScrollOpt "-background \"$fsBox(scrollBackground)\" " } if {"$fsBox(scrollForeground)" != ""} { append tmpScrollOpt "-foreground \"$fsBox(scrollForeground)\" " } if {[file exists [file tail $fsBoxFileName]] && [IsAFile [file tail $fsBoxFileName]]} { set fsBox(name) [file tail $fsBoxFileName] } { set fsBox(name) "" } if {[file exists $fsBoxFileName] && [IsADir $fsBoxFileName]} { set fsBox(path) $fsBoxFileName } { if {"[file dirname $fsBoxFileName]" != "."} { set fsBox(path) [file dirname $fsBoxFileName] } } if {$fsBox(showPixmap)} { set fsBox(path) [string trimleft $fsBox(path) @] } if {"$fsBox(path)" != "" && [file exists $fsBox(path)] && [IsADir $fsBox(path)]} { set fsBox(internalPath) $fsBox(path) } { if {"$fsBox(internalPath)" == "" || ![file exists $fsBox(internalPath)]} { set fsBox(internalPath) [pwd] } } # build widget structure # start build of toplevel if {"[info commands XFDestroy]" != ""} { catch {XFDestroy .fsBox} } { catch {destroy .fsBox} } toplevel .fsBox -borderwidth 0 catch ".fsBox config $tmpFrameOpt" wm geometry .fsBox 350x300 wm title .fsBox {File select box} wm maxsize .fsBox 1000 1000 wm minsize .fsBox 100 100 # end build of toplevel label .fsBox.message1 -anchor c -relief raised -text "$fsBoxMessage" catch ".fsBox.message1 config $tmpMessageOpt" frame .fsBox.frame1 -borderwidth 0 -relief raised catch ".fsBox.frame1 config $tmpFrameOpt" button .fsBox.frame1.ok -text "OK" -command " global fsBox set fsBox(name) \[.fsBox.file.file get\] if {$fsBox(showPixmap)} { set fsBox(path) @\[.fsBox.path.path get\] } { set fsBox(path) \[.fsBox.path.path get\] } set fsBox(internalPath) \[.fsBox.path.path get\] $fsBoxActionOk if {\"\[info commands XFDestroy\]\" != \"\"} { catch {XFDestroy .fsBox} } { catch {destroy .fsBox} }" catch ".fsBox.frame1.ok config $tmpButtonOpt" button .fsBox.frame1.rescan -text "Rescan" -command { global fsBox FSBoxFSShow [.fsBox.path.path get] [.fsBox.pattern.pattern get] $fsBox(all)} catch ".fsBox.frame1.rescan config $tmpButtonOpt" button .fsBox.frame1.cancel -text "Cancel" -command " global fsBox set fsBox(name) {} set fsBox(path) {} $fsBoxActionCancel if {\"\[info commands XFDestroy\]\" != \"\"} { catch {XFDestroy .fsBox} } { catch {destroy .fsBox} }" catch ".fsBox.frame1.cancel config $tmpButtonOpt" if {$fsBox(showPixmap)} { frame .fsBox.frame2 -borderwidth 0 -relief raised catch ".fsBox.frame2 config $tmpFrameOpt" scrollbar .fsBox.frame2.scrollbar3 -command {.fsBox.frame2.canvas2 xview} -orient {horizontal} -relief {raised} catch ".fsBox.frame2.scrollbar3 config $tmpScrollOpt" scrollbar .fsBox.frame2.scrollbar1 -command {.fsBox.frame2.canvas2 yview} -relief {raised} catch ".fsBox.frame2.scrollbar1 config $tmpScrollOpt" canvas .fsBox.frame2.canvas2 -confine {true} -relief {raised} -scrollregion {0c 0c 20c 20c} -width {100} -xscrollcommand {.fsBox.frame2.scrollbar3 set} -yscrollcommand {.fsBox.frame2.scrollbar1 set} catch ".fsBox.frame2.canvas2 config $tmpFrameOpt" .fsBox.frame2.canvas2 addtag currentBitmap withtag [.fsBox.frame2.canvas2 create bitmap 5 5 -anchor nw] } frame .fsBox.path -borderwidth 0 -relief raised catch ".fsBox.path config $tmpFrameOpt" frame .fsBox.path.paths -borderwidth 2 -relief raised catch ".fsBox.path.paths config $tmpFrameOpt" menubutton .fsBox.path.paths.paths -borderwidth 0 -menu ".fsBox.path.paths.paths.menu" -relief flat -text "Pathname:" catch ".fsBox.path.paths.paths config $tmpButtonOpt" menu .fsBox.path.paths.paths.menu -tearoff 0 catch ".fsBox.path.paths.paths.menu config $tmpButtonOpt" .fsBox.path.paths.paths.menu add command -label "[string trimright $fsBox(internalPath) {/@}]" -command " global fsBox FSBoxFSShow \[.fsBox.path.path get\] \[.fsBox.pattern.pattern get\] \$fsBox(all) .fsBox.path.path delete 0 end .fsBox.path.path insert 0 [string trimright $fsBox(internalPath) {/@}]" entry .fsBox.path.path -relief sunken catch ".fsBox.path.path config $tmpMessageOpt"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -