不多说,代码如下:
- TextField field = new TextField();
- field.Text = "TextField";
- field.ID = 10;
- field.Editable = true;
- field.Deleteable = false;
- field.DoubledInputPosition = true;
- textControl1.TextFields.Add(field);
- textControl1.Select(field.Start + field.Length, 0);
- DocumentTarget targ = new DocumentTarget("16");
- targ.ID = 16;
- textControl1.DocumentTargets.Add(targ);
- if (textControl1.DocumentTargets.GetItem(16) != null)
- {
- field.Text = "我就随便改改";
- if (textControl1.DocumentTargets.GetItem(16) == null)
- MessageBox.Show("界面还是可以看到Target,怎么这样就取不出来?\n原来是肉吃掉了,剩下骨头");
- }
复制代码 |
|