Import Tk 8.6.8

This commit is contained in:
Cheryl Sabella
2018-02-22 14:31:15 -05:00
parent b1c28856bb
commit 8e57feeeb9
193 changed files with 6172 additions and 4033 deletions

View File

@@ -18,7 +18,7 @@
::msgcat::mcset en "Demo code: %s"
::msgcat::mcset en "About Widget Demo"
::msgcat::mcset en "Tk widget demonstration application"
::msgcat::mcset en "Copyright \u00a9 %s"
::msgcat::mcset en "Copyright © %s"
::msgcat::mcset en "
@@title
Tk Widget Demonstrations

View File

@@ -114,10 +114,12 @@ set m $w.menu.icon
$w.menu add cascade -label "Icons" -menu $m -underline 0
menu $m -tearoff 0
# Main widget program sets variable tk_demoDirectory
$m add command -bitmap @[file join $tk_demoDirectory images pattern.xbm] \
image create photo lilearth -file [file join $tk_demoDirectory \
images earthmenu.png]
$m add command -image lilearth \
-hidemargin 1 -command [list \
tk_dialog $w.pattern {Bitmap Menu Entry} \
"The menu entry you invoked displays a bitmap rather than\
"The menu entry you invoked displays a photoimage rather than\
a text string. Other than this, it is just like any other\
menu entry." {} 0 OK ]
foreach i {info questhead error} {

View File

@@ -18,9 +18,9 @@
::msgcat::mcset nl "Demo code: %s" "Code van Demo %s"
::msgcat::mcset nl "About Widget Demo" "Over deze demonstratie"
::msgcat::mcset nl "Tk widget demonstration" "Demonstratie van Tk widgets"
::msgcat::mcset nl "Copyright \u00a9 %s"
::msgcat::mcset nl "Copyright © %s"
::msgcat::mcset nl "Tk Widget Demonstrations" "Demostratie van Tk widgets"
::msgcat::mcset nl "Tk Widget Demonstrations" "Demonstratie van Tk widgets"
::msgcat::mcset nl "This application provides a front end for several short scripts" \
"Dit programma is een schil rond enkele korte scripts waarmee"
::msgcat::mcset nl "that demonstrate what you can do with Tk widgets. Each of the" \

View File

@@ -83,12 +83,12 @@ $t window create end \
-cursor top_left_arrow} -padx 3
$t insert end " widget. Notice how peer widgets can have different "
$t insert end "font settings, and by default contain all the images "
$t insert end "of the 'parent', but many of the embedded windows, "
$t insert end "such as buttons will not be there. The easiest way "
$t insert end "to ensure they are in all peers is to use '-create' "
$t insert end "embedded window creation scripts "
$t insert end "(the plot above and the 'Make A Peer' button are "
$t insert end "designed to show up in all peers). A good use of "
$t insert end "of the 'parent', but that the embedded windows, "
$t insert end "such as buttons may not appear in the peer. To ensure "
$t insert end "that embedded windows appear in all peers you can set the "
$t insert end "'-create' option to a script or a string containing %W. "
$t insert end "(The plot above and the 'Make A Peer' button are "
$t insert end "designed to show up in all peers.) A good use of "
$t insert end "peers is for "
$t window create end \
-create {button %W.split -text "Split Windows" -command "textSplitWindow %W" \
@@ -112,6 +112,7 @@ $t insert end "you can see how the text widget automatically "
$t insert end "changes the layout. Click on the button again "
$t insert end "to restore the short string.\n"
$t insert end "\nNOTE: these buttons will not appear in peers!\n" "peer_warning"
button $t.default -text Default -command "embDefBg $t" \
-cursor top_left_arrow
$t window create end -window $t.default -padx 3
@@ -164,7 +165,6 @@ $t insert end "\n\nFinally, images fit comfortably in text widgets too:"
$t image create end -image \
[image create photo -file [file join $tk_demoDirectory images ouster.png]]
proc textWindBigB w {
$w configure -borderwidth 15
}
@@ -302,6 +302,7 @@ proc textMakePeer {parent} {
frame $w.f -highlightthickness 1 -borderwidth 1 -relief sunken
set t [$parent peer create $w.f.text -yscrollcommand "$w.scroll set" \
-borderwidth 0 -highlightthickness 0]
$t tag configure peer_warning -font boldFont
pack $t -expand yes -fill both
ttk::scrollbar $w.scroll -command "$t yview"
pack $w.scroll -side right -fill y
@@ -317,6 +318,7 @@ proc textSplitWindow {textW} {
set w [winfo parent $parent]
set t [$textW peer create $w.peer \
-yscrollcommand "$w.scroll set"]
$t tag configure peer_warning -font boldFont
$w.pane add $t
}
} else {