锐英源软件
第一信赖

精通

英语

开源

擅长

开发

培训

胸怀四海 

第一信赖

当前位置:锐英源 / 英语翻译 / 高级文本编辑器和标尺
服务方向
人工智能数据处理
人工智能培训
kaldi数据准备
小语种语音识别
语音识别标注
语音识别系统
语音识别转文字
kaldi开发技术服务
软件开发
运动控制卡上位机
机械加工软件
软件开发培训
Java 安卓移动开发
VC++
C#软件
汇编和破解
驱动开发
技术分类
讨论组翻译
编辑器内表和Rtf转换
在x64中不工作
联系方式
固话:0371-63888850
手机:138-0381-0136
Q Q:396806883
微信:ryysoft

锐英源精品开源心得,转载请注明:“锐英源www.wisestudy.cn,孙老师作品,电话13803810136。”需要全文内容也请联系孙老师。

高级文本编辑器和标尺

进阶文本编辑

Introduction 介绍

About two years ago I was creating a project for university. It was a complex of five programs that were related to testing (checking knowledge I mean). One of them contained a text editor. But unfortunately, I didn't know how to do that, that's why it was very simple. So, after these two years, I decided to rewrite my program in C# .NET (initially, it was written in VB.NET) and create a new powerful text editor. You can see part of it here.

大约两年前,我为大学创建一个项目。这是一个复杂五项目体,内部有相关测试(我的意思检查知识)。其中一个包含一个文本编辑器。但不幸的是,我不知道怎么做,这就是为什么它是非常简单的。所以,这两年之后,我决定在c#中重写我的程序(最初是用VB.NET),并创建一个新的强大的文本编辑器。你可以在这里看到它的一部分。

Background 背景

I spent a lot of time(!) searching the Internet for controls like this, but the best ones are shareware and others did not fit my needs. So, what does this control have? I tried to make it look like Microsoft Word and I think that there are some similarities. The ruler lets you change the following: left and right margins, left indent, hanging indent and right indent. You also can disable margins (their values are set to 1). You can see how it looks in the picture above.

我花了很多时间(!)在互联网搜索这样的控件,但最好的是共享软件并且其他的不符合我的需求。因此,这是什么控件呢?我试图让它看起来像Microsoft Word,我觉得有一些相似之处标尺允许您更改以下内容:左,右页边距,左缩进,悬挂缩进和右缩进。你也可以禁用边距(它们的值设置为1),在上图中你可以看到它的外观。

Also, you can add tabs by clicking on the control with the left mouse button. But it is allowed only inside the area bounded by margins. If you want to remove a tab, just drag it off from the control. 此外,您可以通过鼠标左键点击控件添加标签,但这只允许在边距限定的范围内。如果你想要删除一个标签,只需从控件中将它拖出。

The editor lets you use lists, underline styles, advanced char styles (you can create your own links, that are not words starting with "http://" or even "www"), OLE functionality is also available. I want to thank Oscar Londoño for his article Inserting Images into a RichTextBox Control (The OLE Way). It helped me a lot to deal with OLE. This project contains his code.

编辑器允许您使用列表,下划线风格,先进的字符样式(您可以创建自己的链接,而不是通过开始前缀“http://”甚至“www”),OLE功能也可以。我要感谢奥斯卡·隆多尼奥在RichTextBox控件中插入图片(OLE方式)。它帮助我很多。这个项目包含他的代码。

Using the Code 使用的代码

You can use the code according to the CPOL.您可以根据CPOL使用代码。

Projects are created as Windows Applications, but you can easily convert them into *.dll or just embed code into your project.

项目创建为Windows应用程序,但是您可以很容易地将其转换成*.dll或者只是将代码嵌入到您的项目中。

Unfortunately, I removed Visual Studio 2005, so, sorry but I can't create and upload a Visual Studio 2005 project. But you can import all required files into a Visual Studio 2005 project without any problems. However, note that Visual Studio 2008 added some new namespaces (like LINQ) that Visual Studio 2005 does not "understand". Just remove them. That's all. You are ready.

不幸的是,我删除了Visual Studio2005,那么,抱歉,我不能创建并上传一个Visual Studio 2005项目。但是你可以导入所需的所有文件到一个没有错误的Visual Studio 2005中的。然而,请注意,Visual Studio 2008中添加了一些新的名称空间(比如LINQ),Visual Studio 2005不能“理解”。只要删除它们就可以了。

Points of Interest 兴趣点

One thing that shocked me is that Microsoft has released RichTextBox 6.0! (It is distributed with Microsoft Office 2007) but... with one exception. There is no documentation about its features. All that I've found is a list of added functions. You can find it here. There are also descriptions for all released versions of RichTextBox.

让我震惊的一件事是,微软已经发布了6.0 RichTextBox !(它是分布式与微软Office 2007但是...有一个例外,没有任何有关其功能的文档。我发现一个列表的添加功能。你可以在这里找到它,还有用于RichTextBox中的所有发行版本的说明。

友情链接
版权所有 Copyright(c)2004-2021 锐英源软件
公司注册号:410105000449586 豫ICP备08007559号 最佳分辨率 1024*768
地址:郑州大学北校区院(文化路97号院)内