怎么用vs2005自制文本编辑器。

来源:百度知道 编辑:UC知道 时间:2024/06/17 12:37:59
如题。
我想用VS2005做一个文本编辑器。不知道用什么控件。
是用richTextBox吗?

只要能实现改变词组的颜色就可以了。不要全部改变颜色,字体。
象word那样改变就可以了。
我想用richTextBox能实现。但不知道可不可以。
或者用别的方法都行。只要实现功能。

....
全部改变好改
一个ForeColor就可以

我去试试单变某个段落的的

int a = this.richTextBox1.SelectionIndent;
取得它的位置
int b = this.richTextBox1.SelectionLength;
它的长度
this.richTextBox1.Select(a, b);
选中
this.richTextBox1.SelectionColor = Color.Red;
选中部分改为红色
this.richTextBox1.Select(a+b, b);
this.richTextBox1.SelectionColor = Color.Blue;
后边的改为蓝色

是不是可以用 用户自定义控件??我觉得用自定义控件会比较方便,想实现什么效果都可以