When a form with horizantal scroll bar and its orientation is right to left activates it shows the left area, and the scroll bar is from left to right, How can I show the form Right area and a right to left scroll bar
If you have a form that has scrollbars on it, the area you can see in the form is known as it's viewport. And since a form doesn't give us a DoScroll event we must set the ViewPortLeft and ViewPortTop properties. These properties are listed as read-only in the helpfile, but this is only partly true. They just can't be set directly, we are fortunate that a method for setting these has been provided called SetViewPort...
Code:
*!* 10000 is much bigger than needed insuring we end up completely to the right
thisform.SetViewPort(10000, thisform.ViewPortTop)
...the preceding code will put the viewport as far to the left as possible...which simulates scrolling the form's viewport all the way to the right. Put this code in the Form's Init or in some other event that occurs after the form has intialized and you have set the form's viewport.
craig1442@mchsi.com
"Whom computers would destroy, they must first drive mad." - Anon
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.