Author | Message | Time |
---|---|---|
PaiD | 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 | August 20, 2005, 2:58 PM |
Mangix | lol do a search on Grok's AddChat function. it's really nice :( here's how you append it. [code]rtb.SelStart = Len(.Text) [/code] | August 20, 2005, 3:46 PM |
l2k-Shadow | In the function, remove the .SelStart lines. | August 20, 2005, 4:14 PM |
PaiD | 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. | August 20, 2005, 4:25 PM |
Yegg | Are you sure you are using the AddChat subroutine properly? | August 20, 2005, 5:28 PM |
PaiD | yes >.< | August 20, 2005, 7:03 PM |
Soul Taker | 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. | August 20, 2005, 8:17 PM |
R.a.B.B.i.T | 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. | August 20, 2005, 9:02 PM |
Yegg | 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. | August 20, 2005, 10:35 PM |
R.a.B.B.i.T | It's not using .SelStart(Len(.Text)) after adding <blarg> | August 20, 2005, 11:40 PM |
Soul Taker | I have a feeling he only wants this functionality when the user is holding the scroll carat though. | August 20, 2005, 11:56 PM |
UserLoser. | IIRC, you need to use WM_SETREDRAW, EM_GETSCROLLPOS, EM_SETSCROLLPOS, and InvalidateRect | August 21, 2005, 5:47 AM |
PaiD | Thx Userloser | August 21, 2005, 6:11 AM |
Soul Taker | [quote author=UserLoser link=topic=12575.msg124840#msg124840 date=1124603253] IIRC, you need to use WM_SETREDRAW, EM_GETSCROLLPOS, EM_SETSCROLLPOS, and InvalidateRect [/quote] That's the cheater way to do it though! | August 21, 2005, 9:40 AM |
Mangix | the only thing that matters is the fact that it works. | August 21, 2005, 12:08 PM |
laurion | 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 | August 23, 2005, 2:11 AM |