[FIX] ScrollBar shadow enhancement

Doug Way dway at mat.net
Tue Feb 16 07:48:27 UTC 1999


Okay, now that I'm familiar with the ScrollBar code, here's another
enhancement (I'm on a roll :) ).

This adds a "shadow" image to the Morphic scrollbar when it is being
dragged, which indicates where the scrollbar was at the beginning of the
drag.  (The MVC scrollbar also does this.)  It's a nice visual cue if you
want to go back to where you were before you started dragging.  (I put the
code in the superclass Slider instead of ScrollBar since there's no real
reason for the slider not to use it as well.)

Plus, as more of a fluff item, I activated some orphaned code in ScrollBar
which causes the bar to highlight as you drag it.  (Hey, it's only 2 lines
of code.)  I think it looks good, although probably less important than
the "shadow" image.  (It's in the first line of
Slider>>mouseDownInSlider:/mouseUpInSlider: if you want to remove it.)

The file-in is at:
http://www.mindspring.com/~dway/smalltalk/ShadowScrollBar.cs

Plus, I realize now that the Proportionally-Sized scrollbar fix I posted
earlier had a bunch of line breaks inserted when I pasted it into my email
program... oops.  The easier to read non-line-broken version is at:

http://www.mindspring.com/~dway/smalltalk/SizedScrollBar.cs

- Doug Way
  EAI/Transom Technogies, Ann Arbor, MI
  dway at eai.com, dway at mat.net
  http://www.transom.com

  Smalltalk: Guaranteed Y10K Compliant





More information about the Squeak-dev mailing list