Ticket UUID: | 9d21e52e39c37d9521e8d34da3b301219b8f909c | |||
Title: | [BWidget] ScrollableFrame changes width upon unmap and map events | |||
Type: | Bug | Version: | 1.9.10 | |
Submitter: | anonymous | Created on: | 2016-09-30 19:04:21 | |
Subsystem: | bwidget | Assigned To: | ||
Priority: | 5 Medium | Severity: | Important | |
Status: | Closed | Last Modified: | 2016-10-13 14:33:37 | |
Resolution: | Not Applicable Here | Closed By: | aku | |
Closed on: | 2016-10-06 02:58:11 | |||
Description: |
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: 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] } # This is the modified above procedure. # The modified procedure solves the problem described in https://groups.google.com/forum/#!topic/comp.lang.tcl/Q5prg9lsOYc 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] } | |||
User Comments: |
oehhar added on 2016-10-13 14:33:37:
Thank you. Transfered to bwidget tracker: https://core.tcl.tk/bwidget/tktview/72a5727d1b7fb76b32cea032eb7d4bf7c6fa28bf aku added on 2016-10-06 02:58:11: This report does not apply to Tcllib. The proper repository is |