Browse Prior Art Database

Snap to Increment with Invisible Ticks

IP.com Disclosure Number: IPCOM000111347D
Original Publication Date: 1994-Feb-01
Included in the Prior Art Database: 2005-Mar-26
Document File: 2 page(s) / 42K

Publishing Venue

IBM

Related People

Lewis, JH: AUTHOR [+2]

Abstract

The Presentation Manager* (PM) Slider Control, as provided, has a SNAPTOINCREMENT control bit which causes the slider arm, when released, to "snap to" the nearest tick. This prevents the slider arm from languishing at unidentified areas between visible ticks. The drawback to this is that there are times when it is necessary to create ticks of zero height on the scale to impose proper layout of tick marks. In these cases, the SNAPTOINCREMENT style bit causes the slider arm to snap to ticks which are not visible to the user, leading to apparent inconsistency. That is, sometimes the slider arm snaps to a tick, other times it seems suspended between two ticks.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 72% of the total text.

Snap to Increment with Invisible Ticks

      The Presentation Manager* (PM) Slider Control, as provided, has
a SNAPTOINCREMENT control bit which causes the slider arm, when
released, to "snap to" the nearest tick.  This prevents the slider
arm from languishing at unidentified areas between visible ticks.
The drawback to this is that there are times when it is necessary to
create ticks of zero height on the scale to impose proper layout of
tick marks.  In these cases, the SNAPTOINCREMENT style bit causes the
slider arm to snap to ticks which are not visible to the user,
leading to apparent inconsistency.  That is, sometimes the slider arm
snaps to a tick, other times it seems suspended between two ticks.

      The solution to the problem is to make it APPEAR that the
SNAPTOINCREMENT feature always"snaps to" the closest visible tick.
By intercepting the PM SLN_CHANGEmessage, notification is received
every time the slider arm position is changed.  Upon notification of
this change, the height of the tick mark upon which it rests is
queried.  If the height returned is greater than zero, the slider arm
position is not altered because it has already snapped to the
nearest, visible tick.  However, if the height returned is zero, then
the tick height of the neighboring tick mark to its right is queried.
If this height is greater than zero, the slider arm is reset to rest
on that tick mark.  If the first neighboring tick mark is also zero,
the neighboring tick on the...