Instance Method

indexOfTickMarkAtPoint:

Returns the index of the tick mark closest to the location of the slider represented by the specified point.

Declaration

- (NSInteger)indexOfTickMarkAtPoint:(NSPoint)point;

Parameters

point

The point representing the slider location.

Return Value

The index of the tick mark closest to the specified location.

Discussion

If point is not within the bounding rectangle (plus an extra pixel of space) of any tick mark, the method returns NSNotFound. This method calls rectOfTickMarkAtIndex: for each tick mark on the slider until it finds a tick mark containing point.

See Also

Managing Tick Marks

allowsTickMarkValuesOnly

A Boolean value indicating whether the receiver fixes its values to those values represented by its tick marks.

- closestTickMarkValueToValue:

Returns the value of the tick mark closest to the specified value.

numberOfTickMarks

The number of tick marks associated with the slider, including the tick marks assigned to the minimum and maximum values.

- rectOfTickMarkAtIndex:

Returns the bounding rectangle of the tick mark at the specified index.

tickMarkPosition

The position of the tick marks relative to the receiver.

- tickMarkValueAtIndex:

Returns the receiver’s value represented by the tick mark at the specified index.