Chat Window Challenges

R

Rlrcstr

Greetings, All... I'm writing an internet enabled game and I'm working on
the chat engine. I'm using a RichTextBox as the chat message display window
so I can easily display text in several colors. One of the problems is: in
order to scroll the text box to ensure that the most recently posted message
is visible, I have to give the RichTextBox focus. Even though I can switch
focus back to whatever control had it before the update, it is really
annoying to anyone using the other parts of the game interface.

Can anyone give me some advice as to the best way to handle continuous chat
in an environment like this? Is there a better way than the RichTextBox?
Any thoughts are greatly appreciated. Thanks.

Jerry
 
J

Jerry Camel

I'm setting the insertion point and color and using the AppenText method.
Then I'm calling the ScrollToCaret method, but that only works if the
control has the focus.

I know there's got to be a way to do this, I see it all the time, but for
some reason I just can't figure it out...

Jerry
 
C

CJ Taylor

Wish I could say I had experience with it. I would say that maybe you could
raise an event after its been updated to set the focus back to another
control. Or find another method besides scrolltocaret, I wish I could give
better advice than that..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top