在TRichEdit中加载具有表格且没有表格边框的RTF文件 [英] Loading RTF file having Table in TRichEdit without Table borders

查看:195
本文介绍了在TRichEdit中加载具有表格且没有表格边框的RTF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要加载到TRichEdit控件中的RTF文件。



我所面对的唯一问题是,RTF文件中包含表,并且加载了相同的表显示表格边框。但是当我在MS Word中加载相同的RTF时,它不显示任何边框(客户端希望具有相同的行为)。



有没有办法不显示表格的边框?



我正在使用Delphi7。

解决方案

在RTF格式的实现中,TRichEdit控件不如MS Word完整。
据我所记得,TRichEdit不会处理表格边界。



您将需要将MS Word嵌入为Active X控件,或者使用 TRichView 组件。 TRichView是更好的方法,因为TRichEdit的行为与Windows的不同版本不一致,并且它不依赖于现有的MS Word安装。但这不是免费的组件。 :(



如果只想显示一些文本和表格,可以将其转换为HTML,然后使用带有THtmlView的嵌入式Internet Explorer进行显示。 / p>

I have a RTF file that I am loading into a TRichEdit control.

Only problem that I am facing is, RTF file has Tables in it, loading the same shows table borders. But when I load the same RTF in MS Word it doesn't show any borders(Client want the same behavior).

Is there any way for not displaying borders of table while loading into TRichEdit.

I am using Delphi7.

解决方案

TRichEdit control is less complete than MS Word, in its implementation of the RTF format. As far as I remember, TRichEdit won't handle table borders.

You will need either to embed MS Word as an Active X control, either use a TRichView component. TRichView is the better approach, because TRichEdit behavior is not consistent with diverse version of Windows, and it doesn't depend on an existing MS Word installation. But it's not a free component. :(

If you want only to display some text and tables, you could convert it to HTML, then display it using either an embedded Internet Explorer, either with THtmlView.

这篇关于在TRichEdit中加载具有表格且没有表格边框的RTF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆