Jump to content
  • Advertisement
Sign in to follow this  
Aramoug

Rich Text Box Vertical Scrolling (VB.NET)

This topic is 4972 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm using a rich text box and I'm adding text into it like a text buffer. The problem is, I add the text to the bottom, but it still shows the top. I need a way to make it automatically scroll to the bottom so when text is added onto the bottom, it shows the newest text first, from the bottom. I've tried every different way I can think of but I can't seem to get it to scroll down automatically. I've tried : - .appendtext function - setting the .SelectionStart point to the end of the buffer and modifying the .SelectedText - setting rtf.text = rtf.text + newtext - using .focus before and after adding the new text Is there some other method that I'm unaware of to do this? It seems like such a stupid and trivial problem, I feel stupid just posting this but I've tried everything I can think of with no luck whatsoever. also, i tried searching gamedev but the search function is down =(

Share this post


Link to post
Share on other sites
Advertisement
I'm not sure if you can do this in VB.NET directly but you could declare a function "SendMessage" out of "user32.dll" and use that with 'EM_GETSCROLLPOS' and 'EM_SETSCROLLPOS'. You'll have to check the defines for those consts.

This is probably not the best way to do it, especially if there is a direct way to do this in VB.NET.

HTH anyway

Share this post


Link to post
Share on other sites
I would prefer to avoid using DLL's if at all possible, but if there's no other way I guess I have no choice....

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!