Tk Library Source Code

Artifact [be29d523e9]
Login

Artifact be29d523e94d8c8fd0e46e0a95038d76d46ad4ea:

Attachment "panes.tcl" to ticket [564691ffff] added by pkienzle 2002-06-05 10:42:27.
#!/bin/sh
# the next line starts using wish \
exec wish "$0" "$@"

package require BWidget

PanedWindow .test -side left
set p1 [.test add]
set p2 [.test add]
ScrolledWindow $p1.textbox

if {0} {
    # works no matter where sash is dragged
    set text [text $p1.textbox.text ]
} else {
    # fails when sash is dragged to top of the "2"
    set text [text .text]
}

$p1.textbox setwidget $text
pack $p1.textbox
$text insert 0.0 "1\n2\n3\n4"
button $p2.b -text hello -command { puts "hello" }
pack $p2.b
pack .test -fill both -expand yes