text boxes change scroll bars

Changing the gain and threshold textfields now move the scrollbars and
change the levels in the image.