|
-
Sep 24th, 2001, 06:11 AM
#1
Thread Starter
New Member
Multiline textbox - viewing the text as it is added
I have a multi-line textbox, to which I add text throughout the running of the application. (I suppose you could call it a log).
However, I want to be able to see the last entry on it. If this is beyond the end of the visible part, you have to use the scroll-bar.
Is there an easy way to make it so that you see the last line by default, and have to use the scroll-bar to see the first entry.
-
Sep 24th, 2001, 06:15 AM
#2
Fanatic Member
After you add a line of text, try this.
VB Code:
Text1.SelStart = Len(Text1.Text)
-
Sep 24th, 2001, 06:15 AM
#3
Addicted Member
To add a new line to the end (bottom) of the textbox, use:
TextBox = TextBox & vbCrLf & newline
-
Sep 24th, 2001, 06:15 AM
#4
PowerPoster
Hi
Set ur textbox to multiline = true and vertical scroll bars
Then in the applicable event do something like this.
Regards
Stuart
VB Code:
Private Sub Text1_GotFocus()
Text1.SelStart = Len(Text1.Text)
End Sub
-
Sep 24th, 2001, 06:18 AM
#5
Text1.SelStart = Len(Text1.Text)
Text1.SelText = "Some new text"
This will move the scroll bar down to your last entry.
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
|