How to move scroll bar thumb on click of button.
-
Hi guys, I have one panel and one picturebox in panel.Here picturebox exceed panel height.Now, I wanna to move scroll thumb downward on click of button to let user see the other areas of picturebox. I have written one code in button_click event panel1.VerticallScroll.Value+=5;//5 indicate moving thumb by 5 pixel. I am getting some awkward output.In first click I can move picturebox top by 5,in second click verticall scroll bar get incremented by 5,in 3rd I can move picturebox top by 5,in 4th click verticall scroll bar get incremented by 5. can any one tell me why it so...I want both to be done in one click. pls reply thanks in advance.
Regards Chintan www.visharadsoft.com (I am thinking to change humans to computer, but unfortunately GOD will not give me the source code)
-
Hi guys, I have one panel and one picturebox in panel.Here picturebox exceed panel height.Now, I wanna to move scroll thumb downward on click of button to let user see the other areas of picturebox. I have written one code in button_click event panel1.VerticallScroll.Value+=5;//5 indicate moving thumb by 5 pixel. I am getting some awkward output.In first click I can move picturebox top by 5,in second click verticall scroll bar get incremented by 5,in 3rd I can move picturebox top by 5,in 4th click verticall scroll bar get incremented by 5. can any one tell me why it so...I want both to be done in one click. pls reply thanks in advance.
Regards Chintan www.visharadsoft.com (I am thinking to change humans to computer, but unfortunately GOD will not give me the source code)
Try adding
panel1.Refresh();
to update it after you change the scroll bar, it might help.My current favourite word is: Bauble!
-SK Genius