跟踪更改的.NET对象 [英] .NET Object that Tracks Changes

查看:66
本文介绍了跟踪更改的.NET对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于几个.net页面,我正在寻找一个允许您跟踪字段内变化的对象。

该字段可能是一个多行文本框。

所需要的是当用户在此字段中进行更改时,替换的文本将排列成不同的颜色,而新文本将采用一些新的颜色。



是否有人有一个自定义控件来执行此操作。

For several .net pages I am looking for an object that allows you to track changes within the field.
The field would probably be a multi line text box.
What is desired is when the user makes a change in this field, the replaced text would be lined out or a different color, and the new text in some new color.

Does some one have a custom control that does this.

推荐答案

我认为你必须建立自己的。使用 OnTextChange 事件。只需检查事件方法中的所有规则,并在用户输入时替换文本。但是,如果您希望有彩色文本,我认为您可能需要使用 RichTextBox 。它可能很慢,具体取决于你有多少着色规则以及文本有多长。
I think you will have to build your own. Shouldn't be too difficult using the OnTextChange event. Just check for all your rules in the event method and replace the text as the user is typing. However if you wish to have coloured text and such I think you will probably need to use a RichTextBox instead. It could be slow depending on how many colouring rules you have and how long the text is.


这篇关于跟踪更改的.NET对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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