borderAndreaVB free resources for Visual Basic developersborder

AndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincani

AndreaVB Home | News Home | Forum Home | Downloads | Register | Search | PM | Profile

Previous Topic (FONT PROBLEM)Next Topic (XP style : manifest : issues...) New Topic Post Reply
AndreaVB OnLine : VB General : Add text in text box
Poster Resource
Marcelo
Level: Scholar

Registered: 16-09-2005
Posts: 39
icon Add text in text box

Hi, I need to add lines in a textbox control (set up with multiline and both scrollbars).
For example:
line1
line2
line3
...
lineN

all in a text control.

I tried the following but it won't work:

while i<100
text1.text="line" & i
text1.text=text1.text & vbcr
wend

What do you suggest me?

Thanks in advance,

Marcelo.

23-09-2005 at 08:36 PM
View Profile Send Email to User Show All Posts | Add Comment
Marcelo
Level: Scholar

Registered: 16-09-2005
Posts: 39
icon Re: Add text in text box

I've solved it. I had to use a VbNewLine at the end of each text line.

But... something new turned up:

When this textbox fills up it stays at the first line...
I'd like it to be at the last line as it fills the text box

what can I do to let this happen?

23-09-2005 at 09:59 PM
View Profile Send Email to User Show All Posts | Add Comment
stickleprojects
Level: Moderator


Registered: 09-09-2002
Posts: 891
icon Re: Add text in text box

Hi,
the property you need is selstart... as in... me.textbox.selstart = len~(me.textbox.text)

Regards,
Kieron

____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)

24-09-2005 at 12:01 AM
View Profile Send Email to User Show All Posts | Add Comment
AndreaVB OnLine : VB General : Add text in text box
Previous Topic (FONT PROBLEM)Next Topic (XP style : manifest : issues...)New Topic Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder