Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language

Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

TCL(Tool Command Language) Scripting

BWidget::ScrolledWindow: Scrolling more than 1648 elements


running TclTk8.4 with BWidget 1.7 on Linux machines we found a problem
displaying many items in a ScrollableFrame:

ScrolledWindow .sw
ScrollableFrame .sw.f
.sw setwidget .sw.f
set MyFrame [.sw.f getframe]
for { set i 0 } { $i < 2000 } { incr i } {
     pack [label $MyFrame.l$i -text "\# $i"] -side top


pack .sw

Everything looks ok at the first view. But i'm not able to scroll below
label # 1648.  The scrollbar is scaled correctly but the content only
scrolls down to 1648.

Seen before or better solved before?

Mit sonnigen Gren,

Ingo Reise

Ingo Reise


The problem is caused by the canvas widget which is used inside the
ScrollableFrame. Canvas coordinates are in the range -32k..+32k. The
labels in your example are packed in a frame (MyFrame). This frame is
put at coordinates 0 0 inside the canvas. Checking the size required
by the frame can be done with the followong command (tested with
BWidget 1.7):

% .sw.f:cmd bbox 1
0 46 40000

This does not fit in the canvas.


Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc