回复 1楼jiao419187544的帖子
jiao419187544 你好,
可以把选中的 文本 转化为 TextField,进而锁定。参考代码:
- private void lockedToolStripMenuItem_Click(object sender, EventArgs e)
- {
- string locktext = this.textControl1.Selection.Text;
- TXTextControl.TextField field = new TXTextControl.TextField(locktext);
- field.Deleteable = false;
-
- this.textControl1.Selection.Text = "";
- this.textControl1.TextFields.Add(field);
- }
复制代码 |