简体   繁体   English

在Delphi中显示多行文本的组件

[英]Component to display multiline text in Delphi

I'm a Delphi programmer and I'm trying to write an application in which I want to show text from a telnet server. 我是一个Delphi程序员,我正在尝试编写一个应用程序,该应用程序要在其中显示来自telnet服务器的文本。 For inputting the commands to send I'm using a TLabeledEdit and for receiving the data I'm using TIdTelnet. 为了输入要发送的命令,我使用TLabeledEdit,并且为了接收数据,我使用TIdTelnet。 That works without any problems so far. 到目前为止,这没有任何问题。 But which component should I use to display the text so the output looks like the console window? 但是我应该使用哪个组件来显示文本,以便输出看起来像控制台窗口? Should I use a multiline TLabel and place it into a TScrollBox or a TMemo with TabStop property set to False or is there a better solution? 我应该使用多行TLabel并将其放入TScrollBox或TabStop属性设置为False的TMemo还是有更好的解决方案?

只需使用TMemo(或其替代产品TRichEdit)。

如果希望添加其他功能,例如绘制某些文本行的背景,则可以使用TListBox。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM