复杂的文本框问题(C#高手请进)

来源:百度知道 编辑:UC知道 时间:2024/09/20 23:19:54
我想用TextBox控件或richTextBox实现一个功能,在从面留2-3列固定,不能编辑,用来显示行数,其它的照样可以编辑.显示的行数要能随滚动条一起滚动.
就像UltraEdit那样的.
我想是要将TextBox类改造一翻的,拜求高手!
3楼的提到的,我已经想到了,但滚动条滚动时显示行数的那个RichTextBox不能同步!

非常感谢149032105 ,这就是我要的.

留名~等会有空写写

private void InitializeComponent()
{
this.numberLabel = new System.Windows.Forms.Label();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// numberLabel
//
this.numberLabel.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.numberLabel.Location = new System.Drawing.Point(3, 0);
this.numberLabel.Name = "numberLabel";
this.numberLabel.Size = new System.Drawing.Size(37, 267);