I have two scrollbars, one horizontal, one vertical. im using them to change a right triangles height and width.

i want to be able to adjust the height scrollbar and have that value set the max on the width scrollbar so that I can never go over a 45 degree angle.

IE if height ScrollBar value goes to 45, set Max width ScrollBar value to 45. if height ScrollBar value goes to 35, set max width ScrollBar value to 35.

Any ideas?