Tk Library Source Code

Check-in [80ffa62d60]
Login

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

Overview
Comment: * scripts/scrollableframe.tcl: Minor improvement.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 80ffa62d60c34f7c8969f04392ea9d5bf5cd28398fdf561dbb48f94f3c4a8166
User & Date: csaba 2019-10-21 17:20:28.289
Context
2019-10-21
17:21
* doc/scrollableframe.html: Minor correction. check-in: 1e82cea42a user: csaba tags: trunk
17:20
* scripts/scrollableframe.tcl: Minor improvement. check-in: 80ffa62d60 user: csaba tags: trunk
17:19
* scripts/scrollableframe.tcl: Minor improvement. * doc/scrollableframe.html: Minor correction. check-in: 3257c94cda user: csaba tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to modules/scrollutil/scripts/scrollableframe.tcl.
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
    switch $axis {
	x { set maxOffset [expr {$data(contWidth)  - $data(winWidth)}] }
	y { set maxOffset [expr {$data(contHeight) - $data(winHeight)}] }
    }
    if {$maxOffset < 0} {
	set offset 0
    } elseif {$offset > $maxOffset} {
	set delta [expr {$offset - $maxOffset}]
	roundDn delta $scrlIncr
	incr offset -$delta
    }

    if {$offset != $data(${axis}Offset) || $force} {
	#
	# Save the offset, update the -(x|y) place option, and invoke the
	# command specified as the value of the -(x|y)scrollcommand opton
	#







|
|
<







723
724
725
726
727
728
729
730
731

732
733
734
735
736
737
738
    switch $axis {
	x { set maxOffset [expr {$data(contWidth)  - $data(winWidth)}] }
	y { set maxOffset [expr {$data(contHeight) - $data(winHeight)}] }
    }
    if {$maxOffset < 0} {
	set offset 0
    } elseif {$offset > $maxOffset} {
	set offset $maxOffset
	roundUp offset $scrlIncr

    }

    if {$offset != $data(${axis}Offset) || $force} {
	#
	# Save the offset, update the -(x|y) place option, and invoke the
	# command specified as the value of the -(x|y)scrollcommand opton
	#