Tk Library Source Code

Artifact [f3da18933b]
Login

Artifact f3da18933be14a48062eeb2cc5786f9c49ea1a1e:

Attachment "shakingScrolledWindow.tcl" to ticket [1165534fff] added by pharmatcl 2005-03-18 03:18:39.
# If you are using BWidget 1.7.0, please run following code.
# You will see a shaking ScrolledWindow. 
# The memory consumption keep increasing too.
# If change "-auto both" to "-auto none", no such behavior.
# wish8.3 does not had this problem. wish8.4 has it.
# Note, 1. replaced $bwidget_path to you BWidget directory.
#       2. "CP: 555  * AAA-I am shaking wildly 10mm dia:  59.5 mm" is  
#          a single line, Changing the length of the text dismantles the
#          shaking.
#       3. Shaking is caused by the appearing and disappearing of the scrollers
#          changing "-auto both" to "-auto vertical" dismantles the shaking.
# Any clue to solve it? Thanks.
# Environment:
#     Linux 2.4.21-9.ELsmp 
#     tcl/tk 8.4
#     BWidget 1.7.0

#set bwidget_path /a/installs/BWidget-1.7.0
#lappend auto_path $bwidget_path
package require BWidget

toplevel  .shaking

set f [frame .shaking.butF]

set sw [ScrolledWindow $f.sw -auto both\
	    -relief sunken -borderwidth 2]

set marksList [ListBox $f.lb -relief flat -borderwidth 0 \
		-padx 0 -height 8 -width 40 -bg white]

$sw setwidget $marksList

grid $sw -row 0 -column 0 -columnspan 6 -pady 0 -padx 2m 

$marksList insert end 1 -text "1"
$marksList insert end 2 -text "2"
$marksList insert end 3 -text "3"
$marksList insert end 4 -text "CP: 555  * AAA-I am shaking wildly 10mm dia:  59.5 mm"
$marksList insert end 5 -text "5"
$marksList insert end 6 -text "6"
$marksList insert end 7 -text "7"
$marksList insert end 8 -text "8"

pack $f