How to restrict path of a scrollbar?

Viewed 18

I am trying to implement a scroll bar. A normal scrollbar path will be from the leftmost boundary to the rightmost boundary.

I want a scrollbar that will stop scrolling once 20px is left to reach the leftmost boundary and the same for the right side.

For more explanation:

Suppose the scrollable window size is 100px. Then a normal scrollbar will cover the full 100px but my scrollbar will cover just 100px-(20px + 20px) (subtracting 20px from both sides)

Please guide me on how I could achieve this also let me know if more information is required.

0 Answers
Related