Bwidget Source Code
Check-in [06d203dbdd]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:scrollframe.tcl: width changed when unmapped and mapped. Checkge the Configure vound proc to not be active when currently unmapped. Ticket [72a5727d1b]. Thanks to Alexandru for the ticket and patch.
Timelines: family | ancestors | descendants | both | bwidget
Files: files | file ages | folders
SHA1: 06d203dbdde20c6c1e8cb96fab0d93ffa63b91f3
User & Date: oehhar 2016-10-31 15:12:06
References
2016-10-31
15:13 Closed ticket [72a5727d1b]: ScrollableFrame changes width upon unmap and map events plus 7 other changes artifact: ed00d515d5 user: oehhar
Context
2016-10-31
17:53
Remove the whole <Unmap> binding, as it does not do any thing any more check-in: cb6716528c user: oehhar tags: bwidget
15:12
scrollframe.tcl: width changed when unmapped and mapped. Checkge the Configure vound proc to not be active when currently unmapped. Ticket [72a5727d1b]. Thanks to Alexandru for the ticket and patch. check-in: 06d203dbdd user: oehhar tags: bwidget
14:22
button.tcl: Reverted last change, Eric underlined to not use ttk widgets as a base due to the option data base. Did traditional fix to exclude all options known by button and not known by ttk::button. Ticket [845613e5590ae7cf] check-in: 702ef20c55 user: oehhar tags: bwidget
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.







1
2
3
4
5
6
7





2016-10-31 Harald Oehlmann
	button.tcl: Reverted last change, Eric underlined to
	not use ttk widgets as a base due to the option
	data base. Did traditional fix to exclude all options
	known by button and not known by ttk::button.
	Ticket [845613e5590ae7cf]

>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
2016-10-31 Harald Oehlmann
	scrollframe.tcl: width changed when unmapped and mapped.
	Checkge the Configure vound proc to not be active when
	currently unmapped. Ticket [72a5727d1b]. Thanks to
	Alexandru for the ticket and patch.

2016-10-31 Harald Oehlmann
	button.tcl: Reverted last change, Eric underlined to
	not use ttk widgets as a base due to the option
	data base. Did traditional fix to exclude all options
	known by button and not known by ttk::button.
	Ticket [845613e5590ae7cf]

Changes to scrollframe.tcl.

248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
proc ScrollableFrame::_max {a b} {return [expr {$a <= $b ? $b : $a}]}
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]
}






|
|
|
|
|



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
proc ScrollableFrame::_max {a b} {return [expr {$a <= $b ? $b : $a}]}
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 height [_max [winfo height $canvas.frame] [winfo height $canvas]]
    set width  [_max [winfo width  $canvas.frame] [winfo width  $canvas]]

    $canvas:cmd configure -scrollregion [list 0 0 $width $height]
}