Tk Library Source Code

Check-in [f38162f408]
Login
Bounty program for improvements to Tcl and certain Tcl packages.

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

Overview
Comment: * doc/scrollutil.html: Minor improvements.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f38162f408210c0f1a2d4fe0f225e3ce4f2ad0e6ddc4a90cf3522f8d6dd600f4
User & Date: csaba 2020-02-06 14:09:17
Context
2020-02-09
20:52
Integrated Tklib 0.7 RC into trunk. Updated release information. Tagged Tklib 0.7 Release. Leaf check-in: 4a6cbb19d1 user: aku tags: trunk, tklib-0.7
2020-02-07
16:36
Merged the changes for Scrollutil 1.5 from trunk to release. check-in: dc658ef333 user: csaba tags: tklib-0-7-rc
2020-02-06
14:09
* doc/scrollutil.html: Minor improvements. check-in: f38162f408 user: csaba tags: trunk
14:08
* doc/scrollutil.html: Minor improvements. check-in: e686a78bf1 user: csaba tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/scrollutil/doc/scrollutil.html.

612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
  <p>The script creates a text widget <code>$txt</code> embedded into a
  scrollarea, populates it with 30 lines, and adjusts the vertical view in the
  text window so that line #25 becomes the bottom line.&nbsp; This line has 50
  characters, hence it doesn't fit completely into the window, whose width is
  49 characters.&nbsp; Consequently, the command&nbsp; <code>$txt
  xview</code>&nbsp; will return the list&nbsp; <code>{0.0 0.98}</code>,&nbsp;
  hence the scrollarea's horizontal scrollbar will be mapped and will cover
  most part of the bottom line.&nbsp; Since this line has <code>red</code>
  background, it is easy to see how much of it sticks out above the upper edge
  of the scrollbar.</p>

  <p>Let's analyze what happens if the text widget's height is decreased by
  dragging the main window's upper or lower edge, just until the red pixels get
  covered by the horizontal scrollbar.&nbsp; After performing this action, line
  #25 is completely out of view and the new bottom line is line #24, which has
  48 characters, hence the command&nbsp; <code>$txt xview</code>&nbsp; will
  return&nbsp; <code>{0.0 1.0}</code>.&nbsp; Normally, this would cause the
  horizontal scrollbar to be unmapped.&nbsp; However, that would make line #25
  to the bottom line, thus causing the horizontal scrollbar to be mapped
  again.&nbsp; This time the scrollbar would completely cover this line, which
  would result in line #24 to become the bottom line, which would cause the
  scrollbar to be unmapped again, and so on.&nbsp; In other words, the
  horizontal scrollbar would get mapped and unmapped in an endless loop, giving
  rise to an annoying flickering effect.&nbsp; The built-in locking mechanism
  of the scrollarea widget guards against such potential endless loops.&nbsp;
  To make sure that the locking will work as expected, we have set the
  <code><a href="scrollarea.html#lockinterval">-lockinterval</a></code>
  scrollarea option to <code>10</code> (recall that the default value is
  <code>1</code>).</p>






|






|
|
|



|
|
|







612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
  <p>The script creates a text widget <code>$txt</code> embedded into a
  scrollarea, populates it with 30 lines, and adjusts the vertical view in the
  text window so that line #25 becomes the bottom line.&nbsp; This line has 50
  characters, hence it doesn't fit completely into the window, whose width is
  49 characters.&nbsp; Consequently, the command&nbsp; <code>$txt
  xview</code>&nbsp; will return the list&nbsp; <code>{0.0 0.98}</code>,&nbsp;
  hence the scrollarea's horizontal scrollbar will be mapped and will obscure
  most part of the bottom line.&nbsp; Since this line has <code>red</code>
  background, it is easy to see how much of it sticks out above the upper edge
  of the scrollbar.</p>

  <p>Let's analyze what happens if the text widget's height is decreased by
  dragging the main window's upper or lower edge, just until the red pixels get
  obscured by the horizontal scrollbar.&nbsp; After performing this action,
  line #25 is completely out of view and the new bottom line is line #24, which
  has 48 characters, hence the command&nbsp; <code>$txt xview</code>&nbsp; will
  return&nbsp; <code>{0.0 1.0}</code>.&nbsp; Normally, this would cause the
  horizontal scrollbar to be unmapped.&nbsp; However, that would make line #25
  to the bottom line, thus causing the horizontal scrollbar to be mapped
  again.&nbsp; This time the scrollbar would completely obscure this line,
  which would result in line #24 to become the bottom line, which would cause
  the scrollbar to be unmapped again, and so on.&nbsp; In other words, the
  horizontal scrollbar would get mapped and unmapped in an endless loop, giving
  rise to an annoying flickering effect.&nbsp; The built-in locking mechanism
  of the scrollarea widget guards against such potential endless loops.&nbsp;
  To make sure that the locking will work as expected, we have set the
  <code><a href="scrollarea.html#lockinterval">-lockinterval</a></code>
  scrollarea option to <code>10</code> (recall that the default value is
  <code>1</code>).</p>