Bwidget Source Code
Ticket Change Details
Not logged in
Overview

Artifact ID: 59db5d3b8ebda2017f65900b830ac4c6f1f16987
Ticket: 72a5727d1b7fb76b32cea032eb7d4bf7c6fa28bf
ScrollableFrame changes width upon unmap and map events
User & Date: oehhar 2016-10-13 14:31:46
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    Follwing ticket copied from tcllib tracker: [http://core.tcl.tk/tcllib/tktview/9d21e52e39c37d9521e8d34da3b301219b8f909c]
    
    As stated in the title, the ScrollableFrame changes width upon unmap and map events.
    
    See: [https://groups.google.com/forum/#!topic/comp.lang.tcl/Q5prg9lsOYc]
    
    
    I have found the bug and solved it. Here are the original and modified
    procedures:
    
    <verbatim>
    proc ScrollableFrame::_frameConfigure {canvas {unmap 0}} {
        # This ensures that we don't get funny scrollability in the frame
        # when it is smaller than the canvas space
        # use [winfo] to get height & width of frame
    
        # [winfo] doesn't work for unmapped frame
        set frameh [expr {$unmap ? 0 : [winfo height $canvas.frame]}]
        set framew [expr {$unmap ? 0 : [winfo width $canvas.frame]}]
    
        set height [_max $frameh [winfo height $canvas]]
        set width [_max $framew [winfo width $canvas]]
    
        $canvas:cmd configure -scrollregion [list 0 0 $width $height]
    }
    </verbatim>
    
    This is the modified above procedure.
    <verbatim>
    proc ScrollableFrame::_frameConfigure {canvas {unmap 0}} {
        # This ensures that we don't get funny scrollability in the frame
        # when it is smaller than the canvas space
        # use [winfo] to get height & width of frame
    
        # [winfo] doesn't work for unmapped frame
        if {$unmap} {  return  }
    
        set frameh [winfo height $canvas.frame]
        set framew [winfo width $canvas.frame]
    
        set height [_max $frameh [winfo height $canvas]]
        set width [_max $framew [winfo width $canvas]]
    
        $canvas:cmd configure -scrollregion [list 0 0 $width $height]
    }
    </verbatim>
    
  5. foundin changed to: "1.9.10"
  6. is_private changed to: "0"
  7. login: "oehhar"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "oehhar"
  14. subsystem changed to: "bwidget 1.x"
  15. title changed to:
    ScrollableFrame changes width upon unmap and map events
    
  16. type changed to: "Bug"