How would I go about appending text to a rich text box without the rich text box scrolling down to the new data but still being added to the bottom. I think it uses API but I am not sure. Any ideas?
PS. I have googled and looked @ pscode.com, no luck
lol do a search on Grok's AddChat function. it's really nice :(
here's how you append it.
rtb.SelStart = Len(.Text)
In the function, remove the .SelStart lines.
Um I tried that. The problem Then is if the user has something hightlighted while the AddChat Function has been exucated it will append to the rich text box at the end of the hightlighted part.
Are you sure you are using the AddChat subroutine properly?
yes >.<
Guys... could you actually READ his original post? I believe many people around here have tried to make a RTB or RT add text to the bottom but not scroll, mostly unsucessfully. I think Skywing had to make his own custom version of an RT or something... but don't quote me on that.
Add the text but don't set the pointer to the end of the text in the RTB then. It's not hard, reather, it's extremely simple.
Oh, I didn't read his question properly. I know that Python's wxPython library has a function, SetInsertionPoint(), it takes one parameter, if the value it receives is 0 then it keeps a text control (or RichTextBox) at the very beginning of all the text. And it will not scroll down. I know Visual Basic 6 has something like this, however I do not know what function or method it may be.
It's not using .SelStart(Len(.Text)) after adding <blarg>
I have a feeling he only wants this functionality when the user is holding the scroll carat though.
IIRC, you need to use WM_SETREDRAW, EM_GETSCROLLPOS, EM_SETSCROLLPOS, and InvalidateRect
Thx Userloser
Quote from: UserLoser on August 21, 2005, 12:47 AM
IIRC, you need to use WM_SETREDRAW, EM_GETSCROLLPOS, EM_SETSCROLLPOS, and InvalidateRect
That's the cheater way to do it though!
the only thing that matters is the fact that it works.
Spht added this to his bot, one of the reasons I like it so much :-*
Thanks for the information justin, I've been searching for that for quite some time now :P