• <i id='R9iZe'><tr id='R9iZe'><dt id='R9iZe'><q id='R9iZe'><span id='R9iZe'><b id='R9iZe'><form id='R9iZe'><ins id='R9iZe'></ins><ul id='R9iZe'></ul><sub id='R9iZe'></sub></form><legend id='R9iZe'></legend><bdo id='R9iZe'><pre id='R9iZe'><center id='R9iZe'></center></pre></bdo></b><th id='R9iZe'></th></span></q></dt></tr></i><div id='R9iZe'><tfoot id='R9iZe'></tfoot><dl id='R9iZe'><fieldset id='R9iZe'></fieldset></dl></div>

    <legend id='R9iZe'><style id='R9iZe'><dir id='R9iZe'><q id='R9iZe'></q></dir></style></legend>
  • <small id='R9iZe'></small><noframes id='R9iZe'>

    1. <tfoot id='R9iZe'></tfoot>

          <bdo id='R9iZe'></bdo><ul id='R9iZe'></ul>
      1. TextBox 中 Windows 窗体滚动日志输出的最佳方法

        Best approach to Windows Forms rolling log output in TextBox(TextBox 中 Windows 窗体滚动日志输出的最佳方法)
        • <small id='dEXrO'></small><noframes id='dEXrO'>

            <tbody id='dEXrO'></tbody>
        • <legend id='dEXrO'><style id='dEXrO'><dir id='dEXrO'><q id='dEXrO'></q></dir></style></legend>
            <bdo id='dEXrO'></bdo><ul id='dEXrO'></ul>

              <tfoot id='dEXrO'></tfoot>
              <i id='dEXrO'><tr id='dEXrO'><dt id='dEXrO'><q id='dEXrO'><span id='dEXrO'><b id='dEXrO'><form id='dEXrO'><ins id='dEXrO'></ins><ul id='dEXrO'></ul><sub id='dEXrO'></sub></form><legend id='dEXrO'></legend><bdo id='dEXrO'><pre id='dEXrO'><center id='dEXrO'></center></pre></bdo></b><th id='dEXrO'></th></span></q></dt></tr></i><div id='dEXrO'><tfoot id='dEXrO'></tfoot><dl id='dEXrO'><fieldset id='dEXrO'></fieldset></dl></div>

                1. 本文介绍了TextBox 中 Windows 窗体滚动日志输出的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 Forms 应用程序中,我正在显示来自生成大量输出的长时间运行的命令行应用程序的日志输出.我在后台启动程序,捕获它的输出,当前使用 AppendText 在 TextBox 中显示它.例如,我更喜欢只显示最后 1000 行.从 TextBox 中删除行的成本很高,而且 TextBox 并不是滚动日志显示的最佳方法.

                  In a Forms application I'm displaying log output from a long running command-line application that generated a lot of output. I start the program in the background, and capture its output and currently display it in a TextBox using AppendText. I prefer to only display for example the last 1000 lines. Removing lines from a TextBox is expensive, and a TextBox does not really feels like the best approach for rolling log display.

                  关于在 Windows 窗体中执行滚动日志窗口的最佳控件有什么想法吗?

                  Any ideas on the best Control to do a rolling log window in Windows Forms?

                  推荐答案

                  我曾经让列表框做这种事情.如果行数达到 1000,您只需删除第一行.如果日志行太长,您可以使列表框更宽一些(取决于日志信息以及是否有可能从第一个可见的没有水平滚动的单词)并使水平滚动条可见.

                  I used to have listboxes do this kind of thing. You just remove the first line if the line count reaches, say, 1000. If the log line is too long, you could make the listbox a bit wider (depends on the log information and whether it's possible to catch the meaning from the first visible words without horizontal scrolling) and make the horizonal scrollbar visible.

                  这篇关于TextBox 中 Windows 窗体滚动日志输出的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to keep the Text of a Read only TextBox after PostBack()?(PostBack()之后如何保留只读文本框的文本?)
                  Winforms Textbox - Using Ctrl-Backspace to Delete Whole Word(Winforms 文本框 - 使用 Ctrl-Backspace 删除整个单词)
                  C# - Add button click events using code(C# - 使用代码添加按钮单击事件)
                  Multi-color TextBox C#(多色文本框 C#)
                  C# Numeric Only TextBox Control(C# 纯数字文本框控件)
                  C# .NET multiline TextBox with same-width characters(具有相同宽度字符的 C# .NET 多行文本框)

                  <small id='H9Mco'></small><noframes id='H9Mco'>

                    1. <legend id='H9Mco'><style id='H9Mco'><dir id='H9Mco'><q id='H9Mco'></q></dir></style></legend>
                    2. <tfoot id='H9Mco'></tfoot>
                        <tbody id='H9Mco'></tbody>
                        <bdo id='H9Mco'></bdo><ul id='H9Mco'></ul>

                          <i id='H9Mco'><tr id='H9Mco'><dt id='H9Mco'><q id='H9Mco'><span id='H9Mco'><b id='H9Mco'><form id='H9Mco'><ins id='H9Mco'></ins><ul id='H9Mco'></ul><sub id='H9Mco'></sub></form><legend id='H9Mco'></legend><bdo id='H9Mco'><pre id='H9Mco'><center id='H9Mco'></center></pre></bdo></b><th id='H9Mco'></th></span></q></dt></tr></i><div id='H9Mco'><tfoot id='H9Mco'></tfoot><dl id='H9Mco'><fieldset id='H9Mco'></fieldset></dl></div>