Keeping the scroll location in a text box

jrmellis

Registered User.
Local time
Today, 12:03
Joined
Mar 21, 2002
Messages
30
I am scrolling in a text box and I am in the middle of the box. I then click on a hyperlink outside of the box to view a picture. When I go back to the text box, I have to start from the top again. I there a way to keep the scroll location of the text box once it has lost focus?

Thanks much
 
Since you haven't posted your code I'm guessing you are using the Form's timer to scroll text through the textbox.

So, that said, I'm just suggesting that if you have a variable that you have dimensioned i.e Dim intPosition As Integer which stores the scroll position, you might use the Static command i.e Static intPosition As Integer which means that each time the procedure is called it remembers the value of the variable from the last time the procedure was called.
 
I am not using any code. The field is a memo field with lots of text. I have to use the vertical scroll bar to see all the text. What I want is that when I have scrolled down into the box to read what is there that after clicking outside of the box that I do not have to scroll to where I was before the box looses focus, I could just contine reading from where I was before.
 
Sorry, I read it as a different sort of scrolling. :cool:
 
Actually it reset the scroll bar back to where the cursor is. If you put your cusor in the text, click outside and come back it should be where you were. I am not sure how to reference the scroll bar itself on the memo field. Scroll bars typically have a property that shows something like a percentage of scroll. But I don't see that on the memo field. If it is possible to access that, you should be able to capture it on loose focus and reset it on get focus.
 

Users who are viewing this thread

Back
Top Bottom