|
-
October 11th, 2001, 03:10 PM
#1
Auto Scroll Down w/Text Box?
If I add more and more text into a text box.. I want it to automatically scroll down to see the last information that was added. I've tried to do a SelStart being the last character but it doesn't work correctly.
Has anyone done something similar?
Let me know what you did
Thanks,
Jv
-
October 11th, 2001, 05:48 PM
#2
Re: Auto Scroll Down w/Text Box?
private Sub Text1_Change()
Text1.SetFocus
SendKeys "^{END}"
End Sub
The idea is to set focus to your text box and then imitate user typing Ctrl+End.
You can also remembe which control had focus before to be able reset it after.
-
October 11th, 2001, 06:45 PM
#3
Re: Auto Scroll Down w/Text Box?
I have no problem with keeping the last line added visible using this simple Program. just make sure you have MultiLine set to true
option Explicit
private Sub Command1_Click()
static ctr
Text1.Text = Text1.Text & "Now is the time " & ctr & vbCrLf
Text1.SelStart = len(Text1.Text)
ctr = ctr + 1
End Sub
John G
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|