textbox...

I'm using VB6 (professional edition).

If I have a textbox and multiline property is true. Then I add lines in textbox and new line goes always below the previous one. When there is more lines than there is room in a textbox, I don't see anymore those newest lines.
I have to use scrollbars to see those lines.

What I have to do so that I can see always those newest lines?

Thanks in advance!
majalaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

corvanderlindenCommented:
Use:

txtEditor.Text = txtEditor.Text & "some string"

txtEditor.SelStart = Len(txtEditor.Text)
txtEditor.SelLength = 0

This positions you at the end of the text. The last line added should be visible
0
KDivadCommented:
Set the scrollbar property to 1, 2 or 3 depending on whether you want horizontal, vertical or both. Unfortunately, this isn't available at runtime, you must set this property at designtime.
0
majalaAuthor Commented:
Thanks corvanderlinder!

If send your Comment as an answer so I can give you your points.

0
corvanderlindenCommented:
Use:

txtEditor.Text = txtEditor.Text & "some string"

txtEditor.SelStart = Len(txtEditor.Text)
txtEditor.SelLength = 0

This positions you at the end of the text. The last line added should be visible
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.