954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

writing from bottom up in rich text box

is there any simple way to do this?

im making a chat client and i want it to display text like all chat clients do, which is buttom to top.
Thanks!

plazmo
Posting Whiz in Training
207 posts since Aug 2005
Reputation Points: 23
Solved Threads: 16
 

is there any simple way to do this?

im making a chat client and i want it to display text like all chat clients do, which is buttom to top. Thanks!

well i know how to write it how i want it in the rich text box. but i need it to auto scroll down. anyone??!?!?

plazmo
Posting Whiz in Training
207 posts since Aug 2005
Reputation Points: 23
Solved Threads: 16
 

Most chat clients dont write from the bottom up.

They write from the top down but when it is full they start to scroll. Is this a web or windows forms app?

f1 fan
Posting Whiz in Training
279 posts since Jan 2006
Reputation Points: 26
Solved Threads: 11
 

i guess i meant that. but i need help on making it auto scroll. because when it fills regularly, the new text is put below the old text which is out of display.
this is a windows form

plazmo
Posting Whiz in Training
207 posts since Aug 2005
Reputation Points: 23
Solved Threads: 16
 

Its been a while since i used the rtb and did anything like it. From memory though i think i had to select the last character and then unselect it without the rtb painting. I will look and see if i can get back to you with something more definite

f1 fan
Posting Whiz in Training
279 posts since Jan 2006
Reputation Points: 26
Solved Threads: 11
 
Its been a while since i used the rtb and did anything like it. From memory though i think i had to select the last character and then unselect it without the rtb painting. I will look and see if i can get back to you with something more definite

ive seen people saying to select the last char then unselect it, but when there gets to be a lot of text it gives a flicker effect which i wanted to avoid.
But maybe it wont be visable if its done before its painted, but i dont think paint is called anything the text changes does it?
i guess i could always just create my own textbox control which does this.

plazmo
Posting Whiz in Training
207 posts since Aug 2005
Reputation Points: 23
Solved Threads: 16
 

ok ive found what i was looking for. heres all i needed

RichTextBox1.AppendText(newText)
        RichTextBox1.SelectionStart = Len(RichTextBox1.Text)
        RichTextBox1.ScrollToCaret()
        RichTextBox1.Select()

i dont understand why ms couldnt make is simple and include it in the IDE

plazmo
Posting Whiz in Training
207 posts since Aug 2005
Reputation Points: 23
Solved Threads: 16
 

You can use RichTextBox which is very powerful and professional.

SupportCuteSoft
Newbie Poster
4 posts since Jul 2004
Reputation Points: 8
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You