Menu

#1194 Long line problem in canvas?

obsolete: 8.3.4
open
5
2003-02-09
2002-05-23
Ian Nixon
No

The code below appears (I think) to illustrate a problem
with long lines in a canvas. The code should (I think) produce 6
lines of increasing length. The first 4 are OK, the last 2
(the longest) appear to be drawn incorrectly and have some
"odd" behaviour as you scroll (i.e. they appear at some point
as you scroll down).

Am I missing something?

---- Code ----
set w .f
frame $w

canvas $w.bt -width 150 -height 400 \
-scrollregion "0 0 150 60000" -yscrollcommand "$w.sb set"
scrollbar $w.sb -orient vertical -command "$w.bt yview"
pack $w.bt -side left -fill both -expand 1 -padx 5 -pady 5
pack $w.sb -side left -fill y

pack $w -fill both -expand yes

set off 10
for { set c 1000 } { $c < 60000 } { incr c 10000; incr off 10 } {
puts "create line $off 20 $off $c"
$w.bt create line $off 20 $off $c
}

Discussion

  • Jeffrey Hobbs

    Jeffrey Hobbs - 2003-02-09

    Logged In: YES
    user_id=72656

    I believe DRH may have already corrected this ...

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2003-02-09
    • assigned_to: hobbs --> hobbs
     
MongoDB Logo MongoDB