Bwidget Source Code
Ticket Change Details
Not logged in
Overview

Artifact ID: 31b66ade4ca7bde4f09e7cb3f78604e17fa39b6dc7419fe3c70b7a4b710fa114
Ticket: 45668dbdf0a50fd901270781643f771c23811dd7
ScrollableFrame fails with too many widgets
User & Date: anonymous 2017-10-22 09:22:24
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    If a ScrollableFrame contains too many widgets, it does not display / scroll them correctly anymore. Either the frame does not scroll below a certain point (even if there would be more widgets), or - sometimes - widgets that should be placed towards the bottom of the frame, show up at the top.
    
    This script demonstrates the issue:
    
    <verbatim>
    #!/usr/bin/env tclsh
        
    package require Tk 8.6
    package require BWidget 1.9.7
    
    set widgetCount 200
    set widgetHeight 20
    
    
    # UI #
    ScrollableFrame .sf 
    grid .sf -column 0 -row 0 -sticky nsew
    grid columnconfigure . 0 -weight 1
    
    # Scroll bindings #
    bind . <Button-4> [list .sf yview scroll -1 unit]
    bind . <Button-5> [list .sf yview scroll 1 unit]
    
    grid rowconfigure . 0 -weight 1
    
    # Create widgets #
    for {set i 1} {$i <= $widgetCount} {incr i} {
        grid [label [.sf getframe].$i -text $i -height $widgetHeight]
    }
    </verbatim>
    
    (run and try to  scroll to label #200)
    
    Notes:
    
      *  If the problem does not reproduce, try increasing the 'widgetHeight' and / or 'widgetCount' vars.
    
      *  The key factor seems to be the total height of widgets in the frame and not their number. i.e. the same effect could be reproduced with less widgets, if they are higher.
    
  5. foundin changed to: "1.9.10"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "0d5810a6d532ee60fe454fd2bdbe8e482821d713"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "bwidget"
  15. title changed to: "ScrollableFrame fails with too many widgets"
  16. type changed to: "Bug"