I would use a Slider for that, because it does exactly what you want. Controlling values with a "thumb" that you can move to scale.
Edit:
You can also do it with a Scrollbar by subscribing to its events that are fired when the scroll postition changes and then change the value in the text box accordingly.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…