panedwindow .pw
label .pw.l1 -text text1
label .pw.l2 -text text2
label .pw.l3 -text text3
.pw add .pw.l1
.pw add .pw.l2
.pw add .pw.l3
pack .pw -expand 1 -fill both
wm geometry . 420x131+41+388
update
set s0 [.pw sash coord 0]
set x0 [lindex $s0 0]
set y0 [lindex $s0 1]
#
# Move first sash over
#
event generate .pw <Button-1> -x $x0 -y $y0
event generate .pw <B1-Motion> -x 72 -y 4
event generate .pw <ButtonRelease-1> -x 72 -y 4
update
set s1 [.pw sash coord 1]
set x1 [lindex $s1 0]
set y1 [lindex $s1 1]
#
# Move second sash over
#
event generate .pw <Button-1> -x $x1 -y $y1
event generate .pw <B1-Motion> -x 274 -y 4
event generate .pw <ButtonRelease-1> -x 274 -y 4
update
#
# Click and release with no motion on first sash
# It should not move!
#
set s_before [.pw sash coord 0]
event generate .pw <Button-1> -x 72 -y 4
event generate .pw <ButtonRelease-1> -x 72 -y 4
update
set s_after [.pw sash coord 0]
if {$s_before ne $s_after} {
    puts stderr "Sash 0 moved!!!"
    puts stderr "got $s_after.  Expected $s_before."
}


