Code Monkey home page Code Monkey logo

Comments (5)

joelspadin avatar joelspadin commented on May 27, 2024 1

In WPF, all you need to do is add

richTextBoxConsole.ScrollToEnd();

into ConsoleControl.xaml.cs after appending the text inside WriteOutput().

from consolecontrol.

ashleyemery avatar ashleyemery commented on May 27, 2024 1

I know this is probably even more dead than when the last poster commented but I discovered a simple way to auto scroll even in Windows Forms. Within the onConsoleOutput event on the control, just add the lines:
ConsoleControl.ConsoleControl console = sender as ConsoleControl.ConsoleControl; console.InternalRichTextBox.ScrollToCaret();
This worked fine for me and didn't seem to have much of an effect on performance. However if the lines are coming very thick and fast you could do the scroll every so many event triggers rather than each one.

from consolecontrol.

billw2012 avatar billw2012 commented on May 27, 2024

I guess this is dead, however for the future reference of anybody thinking to use this component with the fix suggested here I can warn you: it is hideously slow. It takes about 2 minutes to add 5000 lines to console if you also perform ScrollToEnd after each one.

from consolecontrol.

dwmkerr avatar dwmkerr commented on May 27, 2024

Thanks for the tip @ashleyemery, hopefully this'll help anyone who has the same problem. I'm unlikely to have the time to add this, but am open to PRs!

from consolecontrol.

sainsaji avatar sainsaji commented on May 27, 2024

I know its too late. But if someone finds it helfull add this inside your form [DllImport("user32.dll")] private static extern IntPtr SendMessage(IntPtr window, int message, int wparam, int lparam);
call this via SendMessage(consoleControl1.InternalRichTextBox.Handle, WmVscroll, SbBottom, 0x0); where consoleControl1 is the name of your consoleControl

from consolecontrol.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.