Link to home
Start Free TrialLog in
Avatar of majala
majala

asked on

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!
Avatar of corvanderlinden
corvanderlinden

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
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.
Avatar of majala

ASKER

Thanks corvanderlinder!

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

ASKER CERTIFIED SOLUTION
Avatar of corvanderlinden
corvanderlinden

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial