如何在rtf文件中写入下标文本 [英] How to write subscript text in rtf file
本文介绍了如何在rtf文件中写入下标文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请我想知道如何写像这样的文本
Hi 世界
或如何在uisng C#的rtf文件中写下标文本
在此先感谢
please i want to know how to write text like this Hello Hi world
OR How to write subscript text in rtf file uisng C#
Thanks in advance
推荐答案
在Windows窗体中,您可以将下标/上标文本添加到RichTextBox
.
单击此链接: http://msdn.microsoft.com/en-us/library/system.windows.forms.richtextbox. selectioncharoffset.aspx [ ^ ]
如果您的RichTextBox
被命名为"richTextBox1",则可以将RTF保存到RTF文件中:
In Windows Forms, you can add subscript/superscript text to aRichTextBox
.
Follow this link: http://msdn.microsoft.com/en-us/library/system.windows.forms.richtextbox.selectioncharoffset.aspx[^]
If yourRichTextBox
is named ''richTextBox1'', then you can save the RTF into a RTF file:
richTextBox1.SaveFile("filename.rtf");
// change 'richTextBox1' into the name of your RichTextBox
// and change "filename.rtf" into the filename of your RTF file.
对于WPF和ASP.NET,我不知道解决方案.
For WPF and ASP.NET, I don''t know a solution.
Rich Text Format 文件是一个简单的文本文件,指定了旧的格式表示法由Microsoft( http://www.biblioscape.com/rtf15_spec.htm [ http://sourceforge.net/projects/netrtfwriter/ [ ^ ]
The Rich Text Format file is a simple text file with an old formatting notation specified by Microsoft (http://www.biblioscape.com/rtf15_spec.htm[^]). Thus you can make rtf without any control at all. The control word \dn6
for example will place the following text in subscript 3pt-s below baseline. So you can simply use an rtf writer like this one: http://sourceforge.net/projects/netrtfwriter/[^]
这篇关于如何在rtf文件中写入下标文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文