Comments (5)
In WPF, all you need to do is add
richTextBoxConsole.ScrollToEnd();
into ConsoleControl.xaml.cs after appending the text inside WriteOutput().
from consolecontrol.
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.
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.
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.
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)
- Unhandled Exception: System.IO.IOException: The handle is invalid for console operation HOT 1
- Can't Launch Node HOT 9
- Handling carriage return for programs that print updates in same place.
- Error in ConsoleControl.WPF + fix HOT 2
- Mystirous ding sound after process stopped HOT 6
- Auto scroll not working after control loses focus HOT 1
- Infinite buffer size
- Parse ANSI Color Codes HOT 1
- WPF Console Sample Does Not Work
- Unable to get ProcessId / or use WaitForExit() HOT 1
- BackgroundWorker is busy even after IsProcessRunning is false HOT 4
- Is it possible to open Ubuntu subsystem? HOT 1
- docs: Document how to wait for a process to exit
- Backspace deletes last readonly character
- ssh is not recognized as a command HOT 1
- Unable to render UTF-8 characters
- Multiple processes
- How to port your repo to be used in .NET 6 winforms or even .NET 7? HOT 1
- New nuget package? HOT 1
- Buffer size is restricted with the internal RichTextBox
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from consolecontrol.