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!

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??!?!?

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?

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

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

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.

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

This article has been dead for over six months. Start a new discussion instead.